Difference between revisions of "ShaderSetOptions"

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Created page with "==shaderSetOptions== <div class="command-min-version-info">Available since: <span class="command-min-version">v4.0.2</span></div> <div class="command-doc">Set renderpasses f...")
 
(Redirected page to Global Command: shaderSetOptions)
 
Line 1: Line 1:
==shaderSetOptions==
+
#REDIRECT [[Global Command: shaderSetOptions]]
 
 
<div class="command-min-version-info">Available since: <span class="command-min-version">v4.0.2</span></div>
 
 
 
<div class="command-doc">Set renderpasses for shader</div>
 
 
 
Lua Syntax:
 
<pre class="command-syntax">shaderSetOptions(value [, id])</pre>
 
===Arguments===
 
====value====
 
:'''''' - value - table of renderpasses
 
====id====
 
:'''int''' - configuration id
 
===Flags===
 
===Return Values===
 
None.
 
===Examples===
 
Example 1: set transparent draw style for an object
 
<syntaxhighlight>
 
shaderSetOptions({{shader = 0, comp_dst=1, comp_src=4 }}, 1)Objects.turning_object.ShaderSet = 1
 
</syntaxhighlight>
 
Example 2: set shader options
 
<syntaxhighlight>
 
shaderSetOptions({ renderbuffers=2,{ shader = shaders.num(), source=0, target = 1, clear = 0 },{ shader = shaders.num(), source=0, target = 0, clear = 0 },{ shader = shaders.bnum(), source=1, target = 0, clear = 0, comp_dst=0 }})
 
</syntaxhighlight>
 

Latest revision as of 12:33, 19 May 2023