Difference between revisions of "GLSL MAT"

From TouchDesigner Documentation
Jump to: navigation, search
(officializing)
(Tag: 2020.20000)
 
(38 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
+
{{Summary
{{Summary|OPfamily=MAT|OPtype=glsl|OPlabel=GLSL|OPlicense=Non-Commercial|OPclass=glslMAT_Class|OPfilter=False
 
 
 
 
|short=The GLSL MAT allows you to write or import custom materials into TouchDesigner.
 
|short=The GLSL MAT allows you to write or import custom materials into TouchDesigner.
 
+
|opLicense=Non-Commercial
|long=The GLSL MAT allows you to write or import custom materials into TouchDesigner. When there are compile errors in a GLSL [[shader]], a blue/red checkerboard ''error'' shader will be displayed.
+
|opFamily=MAT
 
+
|opFilter=False texe
 +
|opLabel=GLSL
 +
|opClass=glslMAT_Class
 +
|opType=glsl
 +
|long=The GLSL MAT allows you to write or import custom materials into TouchDesigner. When there are compile errors in a GLSL [[shader]], a blue/red checkerboard ''error'' shader will be displayed.
 +
 
For more information on writing a shader, see [[Write a GLSL Material]], and the [[:Category:GLSL|GLSL Category]].
 
For more information on writing a shader, see [[Write a GLSL Material]], and the [[:Category:GLSL|GLSL Category]].
 
}}
 
 
{{ParameterPage|Pagename=Load|OPfamily=MAT|items=
 
 
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=glslversion|Parlabel=GLSL Version|Parorder=0
 
 
|Parsummary=Pick what version of GLSL to compile the shader with.
 
 
|Paritems=
 
 
 
{{Menuitem|Itemlabel=1.20|Itemname=glsl120|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{Menuitem|Itemlabel=3.30|Itemname=glsl330|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{Menuitem|Itemlabel=4.00|Itemname=glsl400|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{Menuitem|Itemlabel=4.10|Itemname=glsl410|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{Menuitem|Itemlabel=4.20|Itemname=glsl420|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{Menuitem|Itemlabel=4.30|Itemname=glsl430|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{Menuitem|Itemlabel=4.40|Itemname=glsl440|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{Menuitem|Itemlabel=4.50|Itemname=glsl450|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
 
}}
 
}}
{{ParDatRef|OPfamily=MAT|OPtype=glsl|Parname=vdat|Parlabel=Vertex Shader|Parorder=1
+
{{ParameterPage
 
+
|items={{Parameter
|Parsummary=Path to the DAT that holds the vertex shader code.
+
|parOrder=0
 
+
|parSummary=Pick what version of GLSL to compile the shader with.
 +
|parLabel=GLSL Version
 +
|parItems={{ParameterItem
 +
|itemLabel=1.20
 +
|opFamily=MAT
 +
|itemName=glsl120
 +
|parName=glslversion
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|itemLabel=3.30
 +
|opFamily=MAT
 +
|itemName=glsl330
 +
|parName=glslversion
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|itemLabel=4.00
 +
|opFamily=MAT
 +
|itemName=glsl400
 +
|parName=glslversion
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|itemLabel=4.10
 +
|opFamily=MAT
 +
|itemName=glsl410
 +
|parName=glslversion
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|itemLabel=4.20
 +
|opFamily=MAT
 +
|itemName=glsl420
 +
|parName=glslversion
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|itemLabel=4.30
 +
|opFamily=MAT
 +
|itemName=glsl430
 +
|parName=glslversion
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|itemLabel=4.40
 +
|opFamily=MAT
 +
|itemName=glsl440
 +
|parName=glslversion
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|itemLabel=4.50
 +
|opFamily=MAT
 +
|itemName=glsl450
 +
|parName=glslversion
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=MAT
 +
|parName=glslversion
 +
|itemLabel=4.60
 +
|itemName=glsl460
 +
|itemSummary=
 
}}
 
}}
{{ParDatRef|OPfamily=MAT|OPtype=glsl|Parname=pdat|Parlabel=Pixel Shader|Parorder=2
+
|opFamily=MAT
 
+
|opType=glsl
|Parsummary=Path to the DAT that holds the pixel shader code.
+
|parName=glslversion
 
+
|parType=Menu
 +
|parReadOnly=
 
}}
 
}}
{{ParButton|OPfamily=MAT|OPtype=glsl|Parname=loadvariablenames|Parlabel=Load Variable Names|Parorder=3
+
{{Parameter
 
+
|opFamily=MAT
|Parsummary=his will read all the declared (and used) uniforms in the compiled GLSL shader, and fill in the various name fields for the uniform parameters.
+
|opType=glslMAT
 
+
|parLabel=Preprocess Directives
 +
|parName=predat
 +
|parType=DAT
 +
|parReadOnly=
 +
|parOrder=1
 +
|parSummary=
 +
|parItems=
 
}}
 
}}
{{ParButton|OPfamily=MAT|OPtype=glsl|Parname=clearvariablenames|Parlabel=Clear Variable Names|Parorder=4
+
{{Parameter
 
+
|parSummary=Path to the DAT that holds the vertex shader code.
|Parsummary=This will clear all of the name fields for the uniform parameters.
+
|parLabel=Vertex Shader
 
+
|opFamily=MAT
 +
|parName=vdat
 +
|opType=glsl
 +
|parOrder=2
 +
|parType=DAT
 +
|parReadOnly=
 +
|parItems=
 
}}
 
}}
{{ParDatRef|OPfamily=MAT|OPtype=glsl|Parname=gdat|Parlabel=Geometry Shader|Parorder=5
+
{{Parameter
 
+
|parSummary=Path to the DAT that holds the pixel shader code.
|Parsummary=Path to the DAT that holds the geometry shader code.
+
|parLabel=Pixel Shader
 
+
|opFamily=MAT
 +
|parName=pdat
 +
|opType=glsl
 +
|parOrder=3
 +
|parType=DAT
 +
|parReadOnly=
 +
|parItems=
 
}}
 
}}
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=inprim|Parlabel=Input Primitive Type|Parorder=6
+
{{Parameter
 
+
|parSummary=This will read all the declared (and used) uniforms in the compiled GLSL shader, and fill in the various name fields for the uniform parameters.
|Parsummary=The type of geometry that will be inputed into the Geometry Shader.
+
|parLabel=Load Uniform Names
 
+
|opFamily=MAT
|Paritems=
+
|parName=loaduniformnames
 
+
|opType=glsl
+
|parOrder=4
{{Menuitem|Itemlabel=Points|Itemname=points|OPfamily=MAT
+
|parType=Pulse
 
+
|parReadOnly=
|Itemsummary=
+
|parItems=
 
 
}}
 
{{Menuitem|Itemlabel=Lines|Itemname=lines|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Triangles|Itemname=triangles|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
 
}}
 
}}
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=outprim|Parlabel=Output Primitive Type|Parorder=7
+
{{Parameter
 
+
|parSummary=This will clear all of the name fields for the uniform parameters.
|Parsummary=The type of geometry that the Geometry Shader will output.
+
|parLabel=Clear Uniform Names
 
+
|opFamily=MAT
|Paritems=
+
|parName=clearuniformnames
 
+
|opType=glsl
+
|parOrder=5
{{Menuitem|Itemlabel=Points|Itemname=points|OPfamily=MAT
+
|parType=Pulse
 
+
|parReadOnly=
|Itemsummary=
+
|parItems=
 
 
}}
 
{{Menuitem|Itemlabel=Line Strip|Itemname=linestrip|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Triangle Strip|Itemname=tristrip|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
 
}}
 
}}
{{ParInteger|OPfamily=MAT|OPtype=glsl|Parname=numout|Parlabel=Num Output Vertices|Parorder=8
+
{{Parameter
 
+
|parSummary=Path to the DAT that holds the geometry shader code.
|Parsummary=The maximum number of vertices the Geometry Shader will output.
+
|parLabel=Geometry Shader
 
+
|opFamily=MAT
}}
+
|parName=gdat
{{ParToggle|OPfamily=MAT|OPtype=glsl|Parname=twocolor|Parlabel=Two Sided Coloring|Parorder=9
+
|opType=glsl
 
+
|parOrder=6
|Parsummary=Enables support for two-sided coloring. When this is enabled the Vertex and/or Geometry shader can write to gl_FrontColor, gl_BackColor, gl_FrontSecondaryColor and gl_BackSecondaryColor and the correct color will be placed into gl_Color and gl_SecondaryColor in the Pixel shader depending on if the primitive's front face or back face is facing the camera. When this is disabled the values placed into gl_FrontColor and gl_FrontSecondaryColor are passed to gl_Color and gl_SecondaryColor regardless of which side of the primitive is facing the camera.
+
|parType=DAT
 
+
|parReadOnly=
 +
|parItems=
 
}}
 
}}
{{ParMatRef|OPfamily=MAT|OPtype=glsl|Parname=inherit|Parlabel=Inherit Uniforms/Samplers from|Parorder=10
+
{{Parameter
 
+
|parOrder=7
|Parsummary=This Material will inherit all of the Textures and Uniforms from the GLSL Material referenced in this parameter.
+
|parSummary=The type of geometry that will be inputed into the Geometry Shader.
 
+
|parLabel=Input Primitive Type
 +
|parItems={{ParameterItem
 +
|itemLabel=Points
 +
|opFamily=MAT
 +
|itemName=points
 +
|parName=inprim
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|itemLabel=Lines
 +
|opFamily=MAT
 +
|itemName=lines
 +
|parName=inprim
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|itemLabel=Triangles
 +
|opFamily=MAT
 +
|itemName=triangles
 +
|parName=inprim
 +
|itemSummary=
 
}}
 
}}
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=lightingspace|Parlabel=Lighting Space|Parorder=11
+
|opFamily=MAT
 
+
|opType=glsl
|Parsummary=Allows lighting space switch from the current default World Space to legacy Camera Space which was used for TouchDesigner 088.
+
|parName=inprim
 
+
|parType=Menu
|Paritems=
+
|parReadOnly=
 
 
 
{{Menuitem|Itemlabel=World Space|Itemname=worldspace|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Camera Space (Legacy 088 shaders)|Itemname=cameraspace|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
 
}}
 
}}
 
+
{{Parameter
}}
+
|parOrder=8
+
|parSummary=The type of geometry that the Geometry Shader will output.
{{ParameterPage|Pagename=Samplers 1|OPfamily=MAT|items=
+
|parLabel=Output Primitive Type
 
+
|parItems={{ParameterItem
 
+
|itemLabel=Points
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=sampler0|Parlabel=Sampler Name|Parorder=0
+
|opFamily=MAT
 
+
|itemName=points
|Parsummary=This is the sampler name that the GLSL program will use to sample from this TOP. The samplers need to be declared at the same dimentions as the TOP (sampler2D for a 2D TOP, sampler3D for 3D TOP).
+
|parName=outprim
 
+
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|itemLabel=Line Strip
 +
|opFamily=MAT
 +
|itemName=linestrip
 +
|parName=outprim
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|itemLabel=Triangle Strip
 +
|opFamily=MAT
 +
|itemName=tristrip
 +
|parName=outprim
 +
|itemSummary=
 
}}
 
}}
{{ParTopRef|OPfamily=MAT|OPtype=glsl|Parname=top0|Parlabel=TOP|Parorder=1
+
|opFamily=MAT
 
+
|opType=glsl
|Parsummary=This is the TOP that will be referenced by the above sampler name above it.
+
|parName=outprim
 
+
|parType=Menu
|Paritems=
+
|parReadOnly=
 
 
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top0extendu|Parlabel=Extend U|Parorder=2
 
 
 
|Parsummary=Sets the extend mode for the U coordiate/direction. Refer to [[Texture Extend Modes]] for more information.
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
 
}}
 
}}
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top0extendv|Parlabel=Extend V|Parorder=3
+
{{Parameter
 
+
|parSummary=The maximum number of vertices the Geometry Shader will output.
|Parsummary=Sets the extend mode for the V coordiate/direction.  Refer to [[Texture Extend Modes]] for more information.
+
|parLabel=Num Output Vertices
 
+
|opFamily=MAT
|Paritems=
+
|parName=numout
 
+
|opType=glsl
+
|parOrder=9
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
+
|parType=Int
 
+
|parReadOnly=
|Itemsummary=
+
|parItems=
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top0extendw|Parlabel=Extend W|Parorder=4
 
 
 
|Parsummary=Sets the extend mode for the W coordiate/direction. Only used for [[3D Textures]].  Refer to [[Texture Extend Modes]] for more information.
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top0filter|Parlabel=Filter|Parorder=5
 
 
 
|Parsummary=Controls how this TOP is filtered when it's gets used. See [[Texture Filtering]] for more information.
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Nearest|Itemname=nearest|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Linear|Itemname=linear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mipmap Linear|Itemname=mipmaplinear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top0anisotropy|Parlabel=Anisotropic Filter|Parorder=6
 
 
 
|Parsummary=Controls the level of anisotropic filtering used on the TOP when it's sampled. This results in more samples when sampling a TOP, increasing the texturing quality. Refer to [[Anisotropic Filtering]] for more information.
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Off|Itemname=off|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=2x|Itemname=2x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=4x|Itemname=4x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=8x|Itemname=8x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=16x|Itemname=16x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=sampler1|Parlabel=Sampler Name|Parorder=7
 
 
 
|Parsummary=
 
 
 
}}
 
{{ParTopRef|OPfamily=MAT|OPtype=glsl|Parname=top1|Parlabel=TOP|Parorder=8
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top1extendu|Parlabel=Extend U|Parorder=9
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top1extendv|Parlabel=Extend V|Parorder=10
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top1extendw|Parlabel=Extend W|Parorder=11
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top1filter|Parlabel=Filter|Parorder=12
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Nearest|Itemname=nearest|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Linear|Itemname=linear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mipmap Linear|Itemname=mipmaplinear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top1anisotropy|Parlabel=Anisotropic Filter|Parorder=13
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Off|Itemname=off|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=2x|Itemname=2x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=4x|Itemname=4x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=8x|Itemname=8x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=16x|Itemname=16x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=sampler2|Parlabel=Sampler Name|Parorder=14
 
 
 
|Parsummary=
 
 
 
}}
 
{{ParTopRef|OPfamily=MAT|OPtype=glsl|Parname=top2|Parlabel=TOP|Parorder=15
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top2extendu|Parlabel=Extend U|Parorder=16
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top2extendv|Parlabel=Extend V|Parorder=17
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top2extendw|Parlabel=Extend W|Parorder=18
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top2filter|Parlabel=Filter|Parorder=19
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Nearest|Itemname=nearest|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Linear|Itemname=linear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mipmap Linear|Itemname=mipmaplinear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top2anisotropy|Parlabel=Anisotropic Filter|Parorder=20
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Off|Itemname=off|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=2x|Itemname=2x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=4x|Itemname=4x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=8x|Itemname=8x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=16x|Itemname=16x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=sampler3|Parlabel=Sampler Name|Parorder=21
 
 
 
|Parsummary=
 
 
 
}}
 
{{ParTopRef|OPfamily=MAT|OPtype=glsl|Parname=top3|Parlabel=TOP|Parorder=22
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top3extendu|Parlabel=Extend U|Parorder=23
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top3extendv|Parlabel=Extend V|Parorder=24
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top3extendw|Parlabel=Extend W|Parorder=25
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top3filter|Parlabel=Filter|Parorder=26
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Nearest|Itemname=nearest|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Linear|Itemname=linear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mipmap Linear|Itemname=mipmaplinear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top3anisotropy|Parlabel=Anisotropic Filter|Parorder=27
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Off|Itemname=off|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=2x|Itemname=2x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=4x|Itemname=4x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=8x|Itemname=8x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=16x|Itemname=16x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=sampler4|Parlabel=Sampler Name|Parorder=28
 
 
 
|Parsummary=
 
 
 
}}
 
{{ParTopRef|OPfamily=MAT|OPtype=glsl|Parname=top4|Parlabel=TOP|Parorder=29
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top4extendu|Parlabel=Extend U|Parorder=30
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top4extendv|Parlabel=Extend V|Parorder=31
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top4extendw|Parlabel=Extend W|Parorder=32
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top4filter|Parlabel=Filter|Parorder=33
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Nearest|Itemname=nearest|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Linear|Itemname=linear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mipmap Linear|Itemname=mipmaplinear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top4anisotropy|Parlabel=Anisotropic Filter|Parorder=34
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Off|Itemname=off|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=2x|Itemname=2x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=4x|Itemname=4x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=8x|Itemname=8x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=16x|Itemname=16x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
 
 
}}
 
 
 
}}
 
 
{{ParameterPage|Pagename=Samplers 2|OPfamily=MAT|items=
 
 
 
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=sampler5|Parlabel=Sampler Name|Parorder=0
 
 
 
|Parsummary=
 
 
 
}}
 
{{ParTopRef|OPfamily=MAT|OPtype=glsl|Parname=top5|Parlabel=TOP|Parorder=1
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top5extendu|Parlabel=Extend U|Parorder=2
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top5extendv|Parlabel=Extend V|Parorder=3
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top5extendw|Parlabel=Extend W|Parorder=4
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top5filter|Parlabel=Filter|Parorder=5
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Nearest|Itemname=nearest|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Linear|Itemname=linear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mipmap Linear|Itemname=mipmaplinear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top5anisotropy|Parlabel=Anisotropic Filter|Parorder=6
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Off|Itemname=off|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=2x|Itemname=2x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=4x|Itemname=4x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=8x|Itemname=8x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=16x|Itemname=16x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=sampler6|Parlabel=Sampler Name|Parorder=7
 
 
 
|Parsummary=
 
 
 
}}
 
{{ParTopRef|OPfamily=MAT|OPtype=glsl|Parname=top6|Parlabel=TOP|Parorder=8
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top6extendu|Parlabel=Extend U|Parorder=9
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top6extendv|Parlabel=Extend V|Parorder=10
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top6extendw|Parlabel=Extend W|Parorder=11
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top6filter|Parlabel=Filter|Parorder=12
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Nearest|Itemname=nearest|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Linear|Itemname=linear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mipmap Linear|Itemname=mipmaplinear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top6anisotropy|Parlabel=Anisotropic Filter|Parorder=13
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Off|Itemname=off|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=2x|Itemname=2x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=4x|Itemname=4x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=8x|Itemname=8x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=16x|Itemname=16x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=sampler7|Parlabel=Sampler Name|Parorder=14
 
 
 
|Parsummary=
 
 
 
}}
 
{{ParTopRef|OPfamily=MAT|OPtype=glsl|Parname=top7|Parlabel=TOP|Parorder=15
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top7extendu|Parlabel=Extend U|Parorder=16
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top7extendv|Parlabel=Extend V|Parorder=17
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top7extendw|Parlabel=Extend W|Parorder=18
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top7filter|Parlabel=Filter|Parorder=19
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Nearest|Itemname=nearest|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Linear|Itemname=linear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mipmap Linear|Itemname=mipmaplinear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top7anisotropy|Parlabel=Anisotropic Filter|Parorder=20
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Off|Itemname=off|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=2x|Itemname=2x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=4x|Itemname=4x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=8x|Itemname=8x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=16x|Itemname=16x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=sampler8|Parlabel=Sampler Name|Parorder=21
 
 
 
|Parsummary=
 
 
 
}}
 
{{ParTopRef|OPfamily=MAT|OPtype=glsl|Parname=top8|Parlabel=TOP|Parorder=22
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top8extendu|Parlabel=Extend U|Parorder=23
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top8extendv|Parlabel=Extend V|Parorder=24
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top8extendw|Parlabel=Extend W|Parorder=25
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top8filter|Parlabel=Filter|Parorder=26
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Nearest|Itemname=nearest|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Linear|Itemname=linear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mipmap Linear|Itemname=mipmaplinear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top8anisotropy|Parlabel=Anisotropic Filter|Parorder=27
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Off|Itemname=off|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=2x|Itemname=2x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=4x|Itemname=4x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=8x|Itemname=8x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=16x|Itemname=16x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=sampler9|Parlabel=Sampler Name|Parorder=28
 
 
 
|Parsummary=
 
 
 
}}
 
{{ParTopRef|OPfamily=MAT|OPtype=glsl|Parname=top9|Parlabel=TOP|Parorder=29
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top9extendu|Parlabel=Extend U|Parorder=30
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
 
}}
 
}}
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top9extendv|Parlabel=Extend V|Parorder=31
+
{{Parameter
 
+
|parSummary=Enables support for two-sided coloring. When this is enabled the Vertex and/or Geometry shader can write to gl_FrontColor, gl_BackColor, gl_FrontSecondaryColor and gl_BackSecondaryColor and the correct color will be placed into gl_Color and gl_SecondaryColor in the Pixel shader depending on if the primitive's front face or back face is facing the camera. When this is disabled the values placed into gl_FrontColor and gl_FrontSecondaryColor are passed to gl_Color and gl_SecondaryColor regardless of which side of the primitive is facing the camera.
|Parsummary=
+
|parLabel=Two Sided Coloring
 
+
|opFamily=MAT
|Paritems=
+
|parName=twocolor
 
+
|opType=glsl
+
|parOrder=10
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
+
|parType=Toggle
 
+
|parReadOnly=
|Itemsummary=
+
|parItems=
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
 
}}
 
}}
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top9extendw|Parlabel=Extend W|Parorder=32
+
{{Parameter
 
+
|parSummary=This Material will inherit all of the Textures and Uniforms from the GLSL Material referenced in this parameter.
|Parsummary=
+
|parLabel=Inherit Uniforms/Samplers from
 
+
|opFamily=MAT
|Paritems=
+
|parName=inherit
 
+
|opType=glsl
+
|parOrder=11
{{Menuitem|Itemlabel=Hold|Itemname=hold|OPfamily=MAT
+
|parType=MAT
 
+
|parReadOnly=
|Itemsummary=
+
|parItems=
 
 
}}
 
{{Menuitem|Itemlabel=Zero|Itemname=zero|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Repeat|Itemname=repeat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=Mirror|Itemname=mirror|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
 
}}
 
}}
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top9filter|Parlabel=Filter|Parorder=33
+
{{Parameter
 
+
|parOrder=12
|Parsummary=
+
|parSummary=Allows lighting space switch from the current default World Space to legacy Camera Space which was used for TouchDesigner 088.
 
+
|parLabel=Lighting Space
|Paritems=
+
|parItems={{ParameterItem
 
+
|itemLabel=World Space
+
|opFamily=MAT
{{Menuitem|Itemlabel=Nearest|Itemname=nearest|OPfamily=MAT
+
|itemName=worldspace
 
+
|parName=lightingspace
|Itemsummary=
+
|itemSummary=
 
+
}}<!--
}}
+
-->{{ParameterItem
{{Menuitem|Itemlabel=Linear|Itemname=linear|OPfamily=MAT
+
|itemLabel=Camera Space (Legacy 088 shaders)
 
+
|opFamily=MAT
|Itemsummary=
+
|itemName=cameraspace
 
+
|parName=lightingspace
}}
+
|itemSummary=
{{Menuitem|Itemlabel=Mipmap Linear|Itemname=mipmaplinear|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
 
}}
 
}}
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=top9anisotropy|Parlabel=Anisotropic Filter|Parorder=34
+
|opFamily=MAT
 
+
|opType=glsl
|Parsummary=
+
|parName=lightingspace
 
+
|parType=Menu
|Paritems=
+
|parReadOnly=
 
 
 
{{Menuitem|Itemlabel=Off|Itemname=off|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=2x|Itemname=2x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=4x|Itemname=4x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=8x|Itemname=8x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=16x|Itemname=16x|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
 
}}
 
}}
 
+
|pageSummary=
 +
|pageName=Load
 +
|opFamily=MAT
 
}}
 
}}
 
+
{{ParameterPage
}}
+
|opFamily=MAT
+
|pageName=Samplers
{{ParameterPage|Pagename=Vectors 1|OPfamily=MAT|items=
+
|pageSummary=
 
+
|items={{Parameter
+
|opFamily=MAT
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname0|Parlabel=Uniform Name|Parorder=0
+
|opType=glslMAT
 
+
|parLabel=Sampler Name 0
|Parsummary=The name of the uniform.
+
|parName=sampler0
 
+
|parType=Str
 +
|parReadOnly=
 +
|parOrder=0
 +
|parSummary=This is the sampler name that the GLSL program will use to sample from this TOP. The samplers need to be declared at the same dimentions as the TOP (sampler2D for a 2D TOP, sampler3D for 3D TOP).
 +
|parItems=
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value0|Parlabel=Value|Parorder=1
+
{{Parameter
 
+
|opFamily=MAT
|Parsummary=The value to assign to the uniform. If the uniform is a float the first entry of the four is used, if the uniform is a vec2 the first two entries are used, etc.
+
|opType=glslMAT
 
+
|parLabel=TOP
|Paritems=
+
|parName=top0
 
+
|parType=TOP
 +
|parReadOnly=
 +
|parOrder=1
 +
|parSummary=This is the TOP that will be referenced by the above sampler name above it.
 
 
{{floatitem|Itemlabel=X|Itemname=value0x|OPfamily=MAT
+
'''Exposed by the + Button, texture sampling parameters''':
 
 
|Itemsummary=
 
 
 
}}
 
{{floatitem|Itemlabel=Y|Itemname=value0y|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{floatitem|Itemlabel=Z|Itemname=value0z|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{floatitem|Itemlabel=W|Itemname=value0w|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname1|Parlabel=Uniform Name|Parorder=2
 
 
 
|Parsummary=
 
 
 
}}
 
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value1|Parlabel=Value|Parorder=3
 
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
 
{{floatitem|Itemlabel=X|Itemname=value1x|OPfamily=MAT
+
Refer to the [[Texture Sampling Parameters]] article for more information on the parameters exposed by pressing the + button. The ''parameter'' prefix for each of the parameters is ''top[digit]''.
 
+
|parItems={{Parameter
|Itemsummary=
+
|opFamily=MAT
 
+
|opType=glslMAT
}}
+
|parLabel=Extend U
{{floatitem|Itemlabel=Y|Itemname=value1y|OPfamily=MAT
+
|parName=top0extendu
 
+
|parType=Menu
|Itemsummary=
+
|parReadOnly=
 
+
|parOrder=2
}}
+
|parSummary=
{{floatitem|Itemlabel=Z|Itemname=value1z|OPfamily=MAT
+
|parItems={{ParameterItem
 
+
|opFamily=MAT
|Itemsummary=
+
|parName=top0extendu
 
+
|itemLabel=Hold
}}
+
|itemName=hold
{{floatitem|Itemlabel=W|Itemname=value1w|OPfamily=MAT
+
|itemSummary=
 
+
}}<!--
|Itemsummary=
+
-->{{ParameterItem
 
+
|opFamily=MAT
}}
+
|parName=top0extendu
 
+
|itemLabel=Zero
}}
+
|itemName=zero
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname2|Parlabel=Uniform Name|Parorder=4
+
|itemSummary=
 
+
}}<!--
|Parsummary=
+
-->{{ParameterItem
 
+
|opFamily=MAT
 +
|parName=top0extendu
 +
|itemLabel=Repeat
 +
|itemName=repeat
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=MAT
 +
|parName=top0extendu
 +
|itemLabel=Mirror
 +
|itemName=mirror
 +
|itemSummary=
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value2|Parlabel=Value|Parorder=5
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{floatitem|Itemlabel=X|Itemname=value2x|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Y|Itemname=value2y|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Z|Itemname=value2z|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=W|Itemname=value2w|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname3|Parlabel=Uniform Name|Parorder=6
 
 
|Parsummary=
 
 
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value3|Parlabel=Value|Parorder=7
+
{{Parameter
 
+
|opFamily=MAT
|Parsummary=
+
|opType=glslMAT
 
+
|parLabel=Extend V
|Paritems=
+
|parName=top0extendv
 
+
|parType=Menu
+
|parReadOnly=
{{floatitem|Itemlabel=X|Itemname=value3x|OPfamily=MAT
+
|parOrder=3
 
+
|parSummary=
|Itemsummary=
+
|parItems={{ParameterItem
 
+
|opFamily=MAT
}}
+
|parName=top0extendv
{{floatitem|Itemlabel=Y|Itemname=value3y|OPfamily=MAT
+
|itemLabel=Hold
 
+
|itemName=hold
|Itemsummary=
+
|itemSummary=
 
+
}}<!--
}}
+
-->{{ParameterItem
{{floatitem|Itemlabel=Z|Itemname=value3z|OPfamily=MAT
+
|opFamily=MAT
 
+
|parName=top0extendv
|Itemsummary=
+
|itemLabel=Zero
 
+
|itemName=zero
}}
+
|itemSummary=
{{floatitem|Itemlabel=W|Itemname=value3w|OPfamily=MAT
+
}}<!--
 
+
-->{{ParameterItem
|Itemsummary=
+
|opFamily=MAT
 
+
|parName=top0extendv
}}
+
|itemLabel=Repeat
 
+
|itemName=repeat
}}
+
|itemSummary=
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname4|Parlabel=Uniform Name|Parorder=8
+
}}<!--
 
+
-->{{ParameterItem
|Parsummary=
+
|opFamily=MAT
 
+
|parName=top0extendv
 +
|itemLabel=Mirror
 +
|itemName=mirror
 +
|itemSummary=
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value4|Parlabel=Value|Parorder=9
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{floatitem|Itemlabel=X|Itemname=value4x|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Y|Itemname=value4y|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Z|Itemname=value4z|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=W|Itemname=value4w|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname5|Parlabel=Uniform Name|Parorder=10
 
 
|Parsummary=
 
 
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value5|Parlabel=Value|Parorder=11
+
{{Parameter
 
+
|opFamily=MAT
|Parsummary=
+
|opType=glslMAT
 
+
|parLabel=Extend W
|Paritems=
+
|parName=top0extendw
 
+
|parType=Menu
+
|parReadOnly=
{{floatitem|Itemlabel=X|Itemname=value5x|OPfamily=MAT
+
|parOrder=4
 
+
|parSummary=
|Itemsummary=
+
|parItems={{ParameterItem
 
+
|opFamily=MAT
}}
+
|parName=top0extendw
{{floatitem|Itemlabel=Y|Itemname=value5y|OPfamily=MAT
+
|itemLabel=Hold
 
+
|itemName=hold
|Itemsummary=
+
|itemSummary=
 
+
}}<!--
}}
+
-->{{ParameterItem
{{floatitem|Itemlabel=Z|Itemname=value5z|OPfamily=MAT
+
|opFamily=MAT
 
+
|parName=top0extendw
|Itemsummary=
+
|itemLabel=Zero
 
+
|itemName=zero
}}
+
|itemSummary=
{{floatitem|Itemlabel=W|Itemname=value5w|OPfamily=MAT
+
}}<!--
 
+
-->{{ParameterItem
|Itemsummary=
+
|opFamily=MAT
 
+
|parName=top0extendw
}}
+
|itemLabel=Repeat
 
+
|itemName=repeat
}}
+
|itemSummary=
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname6|Parlabel=Uniform Name|Parorder=12
+
}}<!--
 
+
-->{{ParameterItem
|Parsummary=
+
|opFamily=MAT
 
+
|parName=top0extendw
 +
|itemLabel=Mirror
 +
|itemName=mirror
 +
|itemSummary=
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value6|Parlabel=Value|Parorder=13
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{floatitem|Itemlabel=X|Itemname=value6x|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Y|Itemname=value6y|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Z|Itemname=value6z|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=W|Itemname=value6w|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname7|Parlabel=Uniform Name|Parorder=14
 
 
|Parsummary=
 
 
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value7|Parlabel=Value|Parorder=15
+
{{Parameter
 
+
|opFamily=MAT
|Parsummary=
+
|opType=glslMAT
 
+
|parLabel=Filter
|Paritems=
+
|parName=top0filter
 
+
|parType=Menu
+
|parReadOnly=
{{floatitem|Itemlabel=X|Itemname=value7x|OPfamily=MAT
+
|parOrder=5
 
+
|parSummary=
|Itemsummary=
+
|parItems={{ParameterItem
 
+
|opFamily=MAT
}}
+
|parName=top0filter
{{floatitem|Itemlabel=Y|Itemname=value7y|OPfamily=MAT
+
|itemLabel=Nearest
 
+
|itemName=nearest
|Itemsummary=
+
|itemSummary=
 
+
}}<!--
}}
+
-->{{ParameterItem
{{floatitem|Itemlabel=Z|Itemname=value7z|OPfamily=MAT
+
|opFamily=MAT
 
+
|parName=top0filter
|Itemsummary=
+
|itemLabel=Linear
 
+
|itemName=linear
}}
+
|itemSummary=
{{floatitem|Itemlabel=W|Itemname=value7w|OPfamily=MAT
+
}}<!--
 
+
-->{{ParameterItem
|Itemsummary=
+
|opFamily=MAT
 
+
|parName=top0filter
}}
+
|itemLabel=Mipmap Linear
 
+
|itemName=mipmaplinear
}}
+
|itemSummary=
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname8|Parlabel=Uniform Name|Parorder=16
 
 
 
|Parsummary=
 
 
 
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value8|Parlabel=Value|Parorder=17
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{floatitem|Itemlabel=X|Itemname=value8x|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Y|Itemname=value8y|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Z|Itemname=value8z|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=W|Itemname=value8w|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname9|Parlabel=Uniform Name|Parorder=18
 
 
|Parsummary=
 
 
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value9|Parlabel=Value|Parorder=19
+
{{Parameter
 
+
|opFamily=MAT
|Parsummary=
+
|opType=glslMAT
 
+
|parLabel=Anisotropic Filter
|Paritems=
+
|parName=top0anisotropy
 
+
|parType=Menu
+
|parReadOnly=
{{floatitem|Itemlabel=X|Itemname=value9x|OPfamily=MAT
+
|parOrder=6
 
+
|parSummary=
|Itemsummary=
+
|parItems={{ParameterItem
 
+
|opFamily=MAT
}}
+
|parName=top0anisotropy
{{floatitem|Itemlabel=Y|Itemname=value9y|OPfamily=MAT
+
|itemLabel=Off
 
+
|itemName=off
|Itemsummary=
+
|itemSummary=
 
+
}}<!--
}}
+
-->{{ParameterItem
{{floatitem|Itemlabel=Z|Itemname=value9z|OPfamily=MAT
+
|opFamily=MAT
 
+
|parName=top0anisotropy
|Itemsummary=
+
|itemLabel=2x
 
+
|itemName=2x
}}
+
|itemSummary=
{{floatitem|Itemlabel=W|Itemname=value9w|OPfamily=MAT
+
}}<!--
 
+
-->{{ParameterItem
|Itemsummary=
+
|opFamily=MAT
 
+
|parName=top0anisotropy
}}
+
|itemLabel=4x
 
+
|itemName=4x
}}
+
|itemSummary=
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname10|Parlabel=Uniform Name|Parorder=20
+
}}<!--
 
+
-->{{ParameterItem
|Parsummary=
+
|opFamily=MAT
 
+
|parName=top0anisotropy
 +
|itemLabel=8x
 +
|itemName=8x
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=MAT
 +
|parName=top0anisotropy
 +
|itemLabel=16x
 +
|itemName=16x
 +
|itemSummary=
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value10|Parlabel=Value|Parorder=21
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{floatitem|Itemlabel=X|Itemname=value10x|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Y|Itemname=value10y|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Z|Itemname=value10z|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=W|Itemname=value10w|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
 
}}
 
 
{{ParameterPage|Pagename=Vectors 2|OPfamily=MAT|items=
 
 
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname11|Parlabel=Uniform Name|Parorder=0
 
 
|Parsummary=
 
 
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value11|Parlabel=Value|Parorder=1
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{floatitem|Itemlabel=X|Itemname=value11x|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Y|Itemname=value11y|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Z|Itemname=value11z|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=W|Itemname=value11w|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname12|Parlabel=Uniform Name|Parorder=2
 
 
|Parsummary=
 
 
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value12|Parlabel=Value|Parorder=3
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{floatitem|Itemlabel=X|Itemname=value12x|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Y|Itemname=value12y|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Z|Itemname=value12z|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=W|Itemname=value12w|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname13|Parlabel=Uniform Name|Parorder=4
 
 
|Parsummary=
 
 
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value13|Parlabel=Value|Parorder=5
+
{{ParameterPage
 
+
|opFamily=MAT
|Parsummary=
+
|pageName=Vectors
 
+
|pageSummary=
|Paritems=
+
|items={{Parameter
 
+
|opFamily=MAT
+
|opType=glslMAT
{{floatitem|Itemlabel=X|Itemname=value13x|OPfamily=MAT
+
|parLabel=Uniform Name 0
 
+
|parName=uniname0
|Itemsummary=
+
|parType=Str
 
+
|parReadOnly=
}}
+
|parOrder=0
{{floatitem|Itemlabel=Y|Itemname=value13y|OPfamily=MAT
+
|parSummary=The name of the uniform.
 
+
|parItems=
|Itemsummary=
 
 
 
}}
 
{{floatitem|Itemlabel=Z|Itemname=value13z|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{floatitem|Itemlabel=W|Itemname=value13w|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname14|Parlabel=Uniform Name|Parorder=6
 
 
 
|Parsummary=
 
 
 
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value14|Parlabel=Value|Parorder=7
+
{{Parameter
 
+
|opFamily=MAT
|Parsummary=
+
|opType=glslMAT
 
+
|parLabel=Value
|Paritems=
+
|parName=value0
 
+
|parType=XYZ
+
|parReadOnly=
{{floatitem|Itemlabel=X|Itemname=value14x|OPfamily=MAT
+
|parOrder=1
 
+
|parSummary=The value to assign to the uniform. If the uniform is a float the first entry of the four is used, if the uniform is a vec2 the first two entries are used, etc.
|Itemsummary=
+
|parItems={{ParameterItem
 
+
|opFamily=MAT
}}
+
|parName=value0
{{floatitem|Itemlabel=Y|Itemname=value14y|OPfamily=MAT
+
|itemLabel=Value
 
+
|itemName=value0x
|Itemsummary=
+
|itemSummary=
 
+
}}<!--
}}
+
-->{{ParameterItem
{{floatitem|Itemlabel=Z|Itemname=value14z|OPfamily=MAT
+
|opFamily=MAT
 
+
|parName=value0
|Itemsummary=
+
|itemLabel=Value
 
+
|itemName=value0y
}}
+
|itemSummary=
{{floatitem|Itemlabel=W|Itemname=value14w|OPfamily=MAT
+
}}<!--
 
+
-->{{ParameterItem
|Itemsummary=
+
|opFamily=MAT
 
+
|parName=value0
}}
+
|itemLabel=Value
 
+
|itemName=value0z
}}
+
|itemSummary=
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname15|Parlabel=Uniform Name|Parorder=8
+
}}<!--
 
+
-->{{ParameterItem
|Parsummary=
+
|opFamily=MAT
 
+
|parName=value0
 +
|itemLabel=Value
 +
|itemName=value0w
 +
|itemSummary=
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value15|Parlabel=Value|Parorder=9
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{floatitem|Itemlabel=X|Itemname=value15x|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Y|Itemname=value15y|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Z|Itemname=value15z|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=W|Itemname=value15w|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname16|Parlabel=Uniform Name|Parorder=10
 
 
|Parsummary=
 
 
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value16|Parlabel=Value|Parorder=11
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{floatitem|Itemlabel=X|Itemname=value16x|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Y|Itemname=value16y|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Z|Itemname=value16z|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=W|Itemname=value16w|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname17|Parlabel=Uniform Name|Parorder=12
 
 
|Parsummary=
 
 
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value17|Parlabel=Value|Parorder=13
+
{{ParameterPage
 
+
|opFamily=MAT
|Parsummary=
+
|pageName=Arrays
 
+
|pageSummary=CHOP Uniforms allow you to send CHOP channel data into a GLSL shader as an array. Depending on the array type used, the number of values you can send into the shader may be limited. If you are using Uniform Arrays, you can use the Built-In variable $SYS_GFX_GLSL_MAX_UNIFORMS to get an idea of how many values you can pass to the shader. Current GPUs are vec4 based for uniform arrays, so the maximum array size is $SYS_GFX_GLSL_MAX_UNIFORMS / 4. Other uniforms will take away from this maximum.
|Paritems=
+
If you are using Texture Buffers the maximum array size is far bigger, $SYS_GFX_MAX_TEXTURE_BUFFER_SIZE will tell you the max for this. The max for texture buffer is per texture buffer, and having multiple texture buffers does not take away from the max for each array.
 
+
|items={{Parameter
+
|opFamily=MAT
{{floatitem|Itemlabel=X|Itemname=value17x|OPfamily=MAT
+
|opType=glslMAT
 
+
|parLabel=Uniform Name 0
|Itemsummary=
+
|parName=chopuniname0
 
+
|parType=Str
}}
+
|parReadOnly=
{{floatitem|Itemlabel=Y|Itemname=value17y|OPfamily=MAT
+
|parOrder=0
 
+
|parSummary=The name of the uniform.
|Itemsummary=
+
|parItems=
 
 
}}
 
{{floatitem|Itemlabel=Z|Itemname=value17z|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{floatitem|Itemlabel=W|Itemname=value17w|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname18|Parlabel=Uniform Name|Parorder=14
 
 
 
|Parsummary=
 
 
 
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value18|Parlabel=Value|Parorder=15
+
{{Parameter
 
+
|opFamily=MAT
|Parsummary=
+
|opType=glslMAT
 
+
|parLabel=Type
|Paritems=
+
|parName=chopunitype0
 
+
|parType=Menu
+
|parReadOnly=
{{floatitem|Itemlabel=X|Itemname=value18x|OPfamily=MAT
+
|parOrder=1
 
+
|parSummary=The type of the uniform. You can send up to 4 channels into the GLSL shader in a single uniform. For a CHOP with a single channel declare your uniform as a float, for one with two channels declare your uniform as a vec2, etc. The data is interleaved in the uniform. I.e., the .x component is the 1st channel, .y is the 2nd channel, etc.
|Itemsummary=
+
|parItems={{ParameterItem
 
+
|opFamily=MAT
}}
+
|parName=chopunitype0
{{floatitem|Itemlabel=Y|Itemname=value18y|OPfamily=MAT
+
|itemLabel=float
 
+
|itemName=float
|Itemsummary=
+
|itemSummary=
 
+
}}<!--
}}
+
-->{{ParameterItem
{{floatitem|Itemlabel=Z|Itemname=value18z|OPfamily=MAT
+
|opFamily=MAT
 
+
|parName=chopunitype0
|Itemsummary=
+
|itemLabel=vec2
 
+
|itemName=vec2
}}
+
|itemSummary=
{{floatitem|Itemlabel=W|Itemname=value18w|OPfamily=MAT
+
}}<!--
 
+
-->{{ParameterItem
|Itemsummary=
+
|opFamily=MAT
 
+
|parName=chopunitype0
}}
+
|itemLabel=vec3
 
+
|itemName=vec3
}}
+
|itemSummary=
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname19|Parlabel=Uniform Name|Parorder=16
+
}}<!--
 
+
-->{{ParameterItem
|Parsummary=
+
|opFamily=MAT
 
+
|parName=chopunitype0
 +
|itemLabel=vec4
 +
|itemName=vec4
 +
|itemSummary=
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value19|Parlabel=Value|Parorder=17
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{floatitem|Itemlabel=X|Itemname=value19x|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Y|Itemname=value19y|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=Z|Itemname=value19z|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=W|Itemname=value19w|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname20|Parlabel=Uniform Name|Parorder=18
 
 
|Parsummary=
 
 
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value20|Parlabel=Value|Parorder=19
+
{{Parameter
 
+
|opFamily=MAT
|Parsummary=
+
|opType=glslMAT
 
+
|parLabel=CHOP
|Paritems=
+
|parName=chop0
 
+
|parType=CHOP
+
|parReadOnly=
{{floatitem|Itemlabel=X|Itemname=value20x|OPfamily=MAT
+
|parOrder=2
 
+
|parSummary=The CHOP whose channels will be sent to the GLSL shader.
|Itemsummary=
+
|parItems=
 
 
}}
 
{{floatitem|Itemlabel=Y|Itemname=value20y|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{floatitem|Itemlabel=Z|Itemname=value20z|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{floatitem|Itemlabel=W|Itemname=value20w|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=uniname21|Parlabel=Uniform Name|Parorder=20
 
 
 
|Parsummary=
 
 
 
 
}}
 
}}
{{ParFloat|OPfamily=MAT|OPtype=glsl|Parname=value21|Parlabel=Value|Parorder=21
+
{{Parameter
 
+
|opFamily=MAT
|Parsummary=
+
|opType=glslMAT
 
+
|parLabel=Array Type
|Paritems=
+
|parName=choparraytype0
 
+
|parType=Menu
+
|parReadOnly=
{{floatitem|Itemlabel=X|Itemname=value21x|OPfamily=MAT
+
|parOrder=3
 
+
|parSummary=GPUs can send array data into a GLSL shader using Uniform Arrays or Texture Buffers. A Uniform Array uses very limited memory to store its data, and can be access like any other regular uniform value (but in an array). Texture Buffers use texture memory and texture fetches to access the data, which allows them to store many more values.
|Itemsummary=
 
 
 
}}
 
{{floatitem|Itemlabel=Y|Itemname=value21y|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{floatitem|Itemlabel=Z|Itemname=value21z|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{floatitem|Itemlabel=W|Itemname=value21w|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
 
 
}}
 
 
 
{{ParameterPage|Pagename=Arrays 1|OPfamily=MAT|items=
+
In both cases the index is the 0-based index (an integer) into the array/buffer that you want to get a value for.
 
+
|parItems={{ParameterItem
{{CustomHeader|OPfamily=MAT
+
|opFamily=MAT
 
+
|parName=choparraytype0
|CustomHeader=Arrays
+
|itemLabel=Uniform Array
|CustomSummary=CHOP Uniforms allow you to send CHOP channel data into a GLSL shader as an array. Depending on the array type used, the number of values you can send into the shader may be limited. If you are using Uniform Arrays, you can use the Built-In variable $SYS_GFX_GLSL_MAX_UNIFORMS to get an idea of how many values you can pass to the shader. Current GPUs are vec4 based for uniform arrays, so the maximum array size is $SYS_GFX_GLSL_MAX_UNIFORMS / 4. Other uniforms will take away from this maximum.
+
|itemName=uniformarray
 
+
|itemSummary=A Uniform Array is declared and used like this:
If you are using Texture Buffers the maximum array size is far bigger, $SYS_GFX_MAX_TEXTURE_BUFFER_SIZE will tell you the max for this. The max for texture buffer is per texture buffer, and having multiple texture buffers does not take away from the max for each array.
+
<syntaxhighlight lang=glsl>
 
+
// Array type is vec3, and it takes up to 20 values from the CHOP
}}
+
uniform vec3 arrayName[20];
 
+
// Grab the value at index 10
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=chopuniname0|Parlabel=Uniform Name|Parorder=0
 
 
 
|Parsummary=The name of the uniform.
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=chopunitype0|Parlabel=Type|Parorder=1
 
 
 
|Parsummary=The type of the uniform. You can send up to 4 channels into the GLSL shader in a single uniform. For a CHOP with a single channel declare your uniform as a float, for one with two channels declare your uniform as a vec2, etc. The data is interleaved in the uniform. I.e., the .x component is the 1st channel, .y is the 2nd channel, etc.
 
 
 
|Paritems=
 
 
 
 
 
 
}}
 
{{ParChopRef|OPfamily=MAT|OPtype=glsl|Parname=chop0|Parlabel=CHOP|Parorder=2
 
 
 
|Parsummary=The CHOP whose channels will be sent to the GLSL shader.
 
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=choparraytype0|Parlabel=Array Type|Parorder=3
 
 
 
|Parsummary=GPUs can send array data into a GLSL shader using Uniform Arrays or Texture Buffers. A Uniform Array uses very limited memory to store its data, and can be access like any other regular uniform value (but in an array). Texture Buffers use texture memory and texture fetches to access the data, which allows them to store many more values.
 
 
 
A Uniform Array is declared and used like this:
 
 
<syntaxhighlight lang="glsl>
 
// Array type is vec3, and it takes up to 20 values from the CHOP
 
uniform vec3 arrayName[20];
 
// Grab the value at index 10
 
 
vec3 aValue = arrayName[10];
 
vec3 aValue = arrayName[10];
 
</syntaxhighlight>
 
</syntaxhighlight>
+
}}<!--
A Texture Buffer is declared and used like this:
+
-->{{ParameterItem
 
+
|opFamily=MAT
<syntaxhighlight lang="glsl">
+
|parName=choparraytype0
// A texture buffer will also be a vec4, but only the first 1, 2, 3 or 4 component will contain data, depending on the type you choose.
+
|itemLabel=Texture Buffer
uniform samplerBuffer arrayName;
+
|itemName=texturebuffer
// sampler the value at index 10. It be default returns a vec4, so change it to a vec3 in this example using .xyz
+
|itemSummary=A Texture Buffer is declared and used like this:
vec3 aValue = texelFetchBuffer(arrayName, 10).xyz;
+
<syntaxhighlight lang=glsl>
 +
// A texture buffer will also be a vec4, but only the first 1, 2, 3 or 4 component will contain data, depending on the type you choose.
 +
uniform samplerBuffer arrayName;
 +
// sampler the value at index 10. It be default returns a vec4, so change it to a vec3 in this example using .xyz
 +
vec3 aValue = texelFetch(arrayName, 10).xyz;
 
</syntaxhighlight>
 
</syntaxhighlight>
 
In both cases the index is the 0-based index (an integer) into the array/buffer that you want to get a value for.
 
 
 
|Paritems=
 
 
 
{{Menuitem|Itemlabel=Uniform Array|Itemname=uniformarray|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{Menuitem|Itemlabel=Texture Buffer|Itemname=texturebuffer|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParMiniMenu|OPfamily=MAT|OPtype=glsl|Parname=chanscope0|Parlabel=Channel Scope|Parorder=4
 
 
|Parsummary=ou can select which channels from the CHOP will be used to fill the array. Up to the first 4 channels scoped will be used (depending on the type of the uniform array).
 
 
|Paritems=
 
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=chopuniname1|Parlabel=Uniform Name|Parorder=5
 
 
|Parsummary=
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=chopunitype1|Parlabel=Type|Parorder=6
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
}}
 
{{ParChopRef|OPfamily=MAT|OPtype=glsl|Parname=chop1|Parlabel=CHOP|Parorder=7
 
 
|Parsummary=
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=choparraytype1|Parlabel=Array Type|Parorder=8
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{Menuitem|Itemlabel=Uniform Array|Itemname=uniformarray|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{Menuitem|Itemlabel=Texture Buffer|Itemname=texturebuffer|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParMiniMenu|OPfamily=MAT|OPtype=glsl|Parname=chanscope1|Parlabel=Channel Scope|Parorder=9
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=chopuniname2|Parlabel=Uniform Name|Parorder=10
 
 
|Parsummary=
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=chopunitype2|Parlabel=Type|Parorder=11
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
}}
 
{{ParChopRef|OPfamily=MAT|OPtype=glsl|Parname=chop2|Parlabel=CHOP|Parorder=12
 
 
|Parsummary=
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=choparraytype2|Parlabel=Array Type|Parorder=13
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{Menuitem|Itemlabel=Uniform Array|Itemname=uniformarray|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{Menuitem|Itemlabel=Texture Buffer|Itemname=texturebuffer|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParMiniMenu|OPfamily=MAT|OPtype=glsl|Parname=chanscope2|Parlabel=Channel Scope|Parorder=14
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=chopuniname3|Parlabel=Uniform Name|Parorder=15
 
 
|Parsummary=
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=chopunitype3|Parlabel=Type|Parorder=16
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
}}
 
{{ParChopRef|OPfamily=MAT|OPtype=glsl|Parname=chop3|Parlabel=CHOP|Parorder=17
 
 
|Parsummary=
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=choparraytype3|Parlabel=Array Type|Parorder=18
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{Menuitem|Itemlabel=Uniform Array|Itemname=uniformarray|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{Menuitem|Itemlabel=Texture Buffer|Itemname=texturebuffer|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParMiniMenu|OPfamily=MAT|OPtype=glsl|Parname=chanscope3|Parlabel=Channel Scope|Parorder=19
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=chopuniname4|Parlabel=Uniform Name|Parorder=20
 
 
|Parsummary=
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=chopunitype4|Parlabel=Type|Parorder=21
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
}}
 
{{ParChopRef|OPfamily=MAT|OPtype=glsl|Parname=chop4|Parlabel=CHOP|Parorder=22
 
 
|Parsummary=
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=choparraytype4|Parlabel=Array Type|Parorder=23
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{Menuitem|Itemlabel=Uniform Array|Itemname=uniformarray|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{Menuitem|Itemlabel=Texture Buffer|Itemname=texturebuffer|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParMiniMenu|OPfamily=MAT|OPtype=glsl|Parname=chanscope4|Parlabel=Channel Scope|Parorder=24
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
}}
 
 
}}
 
 
{{ParameterPage|Pagename=Arrays 2|OPfamily=MAT|items=
 
 
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=chopuniname5|Parlabel=Uniform Name|Parorder=0
 
 
|Parsummary=
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=chopunitype5|Parlabel=Type|Parorder=1
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
}}
 
{{ParChopRef|OPfamily=MAT|OPtype=glsl|Parname=chop5|Parlabel=CHOP|Parorder=2
 
 
|Parsummary=
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=choparraytype5|Parlabel=Array Type|Parorder=3
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{Menuitem|Itemlabel=Uniform Array|Itemname=uniformarray|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{Menuitem|Itemlabel=Texture Buffer|Itemname=texturebuffer|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParMiniMenu|OPfamily=MAT|OPtype=glsl|Parname=chanscope5|Parlabel=Channel Scope|Parorder=4
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=chopuniname6|Parlabel=Uniform Name|Parorder=5
 
 
|Parsummary=
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=chopunitype6|Parlabel=Type|Parorder=6
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
}}
 
{{ParChopRef|OPfamily=MAT|OPtype=glsl|Parname=chop6|Parlabel=CHOP|Parorder=7
 
 
|Parsummary=
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=choparraytype6|Parlabel=Array Type|Parorder=8
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{Menuitem|Itemlabel=Uniform Array|Itemname=uniformarray|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{Menuitem|Itemlabel=Texture Buffer|Itemname=texturebuffer|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParMiniMenu|OPfamily=MAT|OPtype=glsl|Parname=chanscope6|Parlabel=Channel Scope|Parorder=9
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=chopuniname7|Parlabel=Uniform Name|Parorder=10
 
 
|Parsummary=
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=chopunitype7|Parlabel=Type|Parorder=11
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
}}
 
{{ParChopRef|OPfamily=MAT|OPtype=glsl|Parname=chop7|Parlabel=CHOP|Parorder=12
 
 
|Parsummary=
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=choparraytype7|Parlabel=Array Type|Parorder=13
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{Menuitem|Itemlabel=Uniform Array|Itemname=uniformarray|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{Menuitem|Itemlabel=Texture Buffer|Itemname=texturebuffer|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParMiniMenu|OPfamily=MAT|OPtype=glsl|Parname=chanscope7|Parlabel=Channel Scope|Parorder=14
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=chopuniname8|Parlabel=Uniform Name|Parorder=15
 
 
|Parsummary=
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=chopunitype8|Parlabel=Type|Parorder=16
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
}}
 
{{ParChopRef|OPfamily=MAT|OPtype=glsl|Parname=chop8|Parlabel=CHOP|Parorder=17
 
 
|Parsummary=
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=choparraytype8|Parlabel=Array Type|Parorder=18
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{Menuitem|Itemlabel=Uniform Array|Itemname=uniformarray|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{Menuitem|Itemlabel=Texture Buffer|Itemname=texturebuffer|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParMiniMenu|OPfamily=MAT|OPtype=glsl|Parname=chanscope8|Parlabel=Channel Scope|Parorder=19
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=chopuniname9|Parlabel=Uniform Name|Parorder=20
 
 
|Parsummary=
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=chopunitype9|Parlabel=Type|Parorder=21
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
}}
 
{{ParChopRef|OPfamily=MAT|OPtype=glsl|Parname=chop9|Parlabel=CHOP|Parorder=22
 
 
|Parsummary=
 
 
}}
 
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=choparraytype9|Parlabel=Array Type|Parorder=23
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{Menuitem|Itemlabel=Uniform Array|Itemname=uniformarray|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
{{Menuitem|Itemlabel=Texture Buffer|Itemname=texturebuffer|OPfamily=MAT
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParMiniMenu|OPfamily=MAT|OPtype=glsl|Parname=chanscope9|Parlabel=Channel Scope|Parorder=24
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
}}
 
 
}}
 
 
{{ParameterPage|Pagename=Matrices|OPfamily=MAT|items=
 
 
{{CustomHeader|OPfamily=MAT
 
 
|CustomHeader=Matrices
 
|CustomSummary=[Relative Xforms are matrices that will transform points and vectors from one space to another space.
 
 
}}
 
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=unimatrixname0|Parlabel=Uniform Name|Parorder=0
 
 
|Parsummary=The name of the uniform. The uniform should be declared as a mat4.
 
 
}}
 
{{ParObjRef|OPfamily=MAT|OPtype=glsl|Parname=fromcomp0|Parlabel=Xform from|Parorder=1
 
 
|Parsummary=Transform from this COMPs world transform.
 
 
}}
 
{{ParObjRef|OPfamily=MAT|OPtype=glsl|Parname=tocomp0|Parlabel=To|Parorder=2
 
 
|Parsummary=Transform to this COMPs world transform.
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=unimatrixname1|Parlabel=Uniform Name|Parorder=3
 
 
|Parsummary=
 
 
}}
 
{{ParObjRef|OPfamily=MAT|OPtype=glsl|Parname=fromcomp1|Parlabel=Xform from|Parorder=4
 
 
|Parsummary=
 
 
}}
 
{{ParObjRef|OPfamily=MAT|OPtype=glsl|Parname=tocomp1|Parlabel=To|Parorder=5
 
 
|Parsummary=
 
 
}}
 
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=unimatrixname2|Parlabel=Uniform Name|Parorder=6
 
 
|Parsummary=
 
 
}}
 
{{ParObjRef|OPfamily=MAT|OPtype=glsl|Parname=fromcomp2|Parlabel=Xform from|Parorder=7
 
 
|Parsummary=
 
 
}}
 
{{ParObjRef|OPfamily=MAT|OPtype=glsl|Parname=tocomp2|Parlabel=To|Parorder=8
 
 
|Parsummary=
 
 
 
}}
 
}}
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=unimatrixname3|Parlabel=Uniform Name|Parorder=9
 
 
|Parsummary=
 
 
 
}}
 
}}
{{ParObjRef|OPfamily=MAT|OPtype=glsl|Parname=fromcomp3|Parlabel=Xform from|Parorder=10
+
{{Parameter
 
+
|opFamily=MAT
|Parsummary=
+
|opType=glslMAT
 
+
|parLabel=Channel Scope
 +
|parName=chanscope0
 +
|parType=StrMenu
 +
|parReadOnly=
 +
|parOrder=4
 +
|parSummary=You can select which channels from the CHOP will be used to fill the array. Up to the first 4 channels scoped will be used (depending on the type of the uniform array).
 +
|parItems={{ParameterItem
 +
|opFamily=MAT
 +
|parName=chanscope0
 +
|itemLabel=*
 +
|itemName=*
 +
|itemSummary=
 
}}
 
}}
{{ParObjRef|OPfamily=MAT|OPtype=glsl|Parname=tocomp3|Parlabel=To|Parorder=11
 
 
|Parsummary=
 
 
 
}}
 
}}
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=unimatrixname4|Parlabel=Uniform Name|Parorder=12
 
 
|Parsummary=
 
 
}}
 
{{ParObjRef|OPfamily=MAT|OPtype=glsl|Parname=fromcomp4|Parlabel=Xform from|Parorder=13
 
 
|Parsummary=
 
 
}}
 
{{ParObjRef|OPfamily=MAT|OPtype=glsl|Parname=tocomp4|Parlabel=To|Parorder=14
 
 
|Parsummary=
 
 
}}
 
 
}}
 
 
{{ParameterPage|Pagename=Deform|OPfamily=MAT|items=
 
 
 
{{ParToggle|OPfamily=MAT|OPtype=glsl|Parname=dodeform|Parlabel=Deform|Parorder=0
 
 
|Parsummary=
 
 
 
}}
 
}}
{{ParMenu|OPfamily=MAT|OPtype=glsl|Parname=deformdata|Parlabel=Get Bone Data:|Parorder=1
+
{{ParameterPage
 
+
|items={{Parameter
|Parsummary=
+
|opFamily=MAT
 
+
|opType=glslMAT
|Paritems=
+
|parLabel=Uniform Name 0
 
+
|parName=matuniname0
+
|parType=Str
{{Menuitem|Itemlabel=From a SOP|Itemname=sop|OPfamily=MAT
+
|parReadOnly=
 
+
|parOrder=0
|Itemsummary=
+
|parSummary=The name of the uniform. The uniform should be declared as a mat4.
 
+
|parItems=
}}
 
{{Menuitem|Itemlabel=From another MAT|Itemname=mat|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
{{Menuitem|Itemlabel=From a DeformIn MAT|Itemname=deformin|OPfamily=MAT
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
 
}}
 
}}
{{ParSopRef|OPfamily=MAT|OPtype=glsl|Parname=targetsop|Parlabel=SOP with Capture Data|Parorder=2
+
{{Parameter
 
+
|opFamily=MAT
|Parsummary=
+
|opType=glslMAT
 
+
|parLabel=Matrix 0
 +
|parName=matvalue0
 +
|parType=OP
 +
|parReadOnly=
 +
|parOrder=1
 +
|parSummary=
 +
|parItems=
 
}}
 
}}
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=pcaptpath|Parlabel=pCaptPath Attrib|Parorder=3
+
{{Parameter
 
+
|opFamily=MAT
|Parsummary=
+
|opType=glslMAT
 
+
|parLabel=Uniform Name 0
 +
|parName=unimatrixname0
 +
|parType=Str
 +
|parReadOnly=
 +
|parOrder=2
 +
|parSummary=The name of the uniform. The uniform should be declared as a mat4.
 +
|parItems=
 
}}
 
}}
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=pcaptdata|Parlabel=pCaptData Attrib|Parorder=4
+
{{Parameter
 
+
|parSummary=Transform from this COMPs world transform.
|Parsummary=
+
|parLabel=Xform from
 
+
|opFamily=MAT
 +
|parName=fromcomp0
 +
|opType=glsl
 +
|parOrder=3
 +
|parType=OBJ
 +
|parReadOnly=
 +
|parItems=
 
}}
 
}}
{{ParString|OPfamily=MAT|OPtype=glsl|Parname=skelrootpath|Parlabel=Skeleton Root Path|Parorder=5
+
{{Parameter
 
+
|parSummary=Transform to this COMPs world transform.
|Parsummary=
+
|parLabel=To
 
+
|opFamily=MAT
 +
|parName=tocomp0
 +
|opType=glsl
 +
|parOrder=4
 +
|parType=OBJ
 +
|parReadOnly=
 +
|parItems=
 
}}
 
}}
{{ParMatRef|OPfamily=MAT|OPtype=glsl|Parname=mat|Parlabel=MAT|Parorder=6
+
|pageSummary=Relative Xforms are matrices that will transform points and vectors from one space to another space.
 
+
|pageName=Matrices
|Parsummary=
+
|opFamily=MAT
 
 
 
}}
 
}}
  
}}
+
{{:MAT Deform Page}}
 
 
{{:MAT Generator Common Page}}
 
{{:MAT Generator Common Page}}
<taggedhistory/>
+
{{History}}
{{MATNavBox|OPfamily=MAT}}
+
{{MATNavBox|opFamily=MAT}}
[[Category:MATs]]
+
{{#invoke:Category|list|MATs}}
<syntaxhighlight lang='glsl'>
 
vec3 color = samplerBuffer(hello,uv).rgb;
 
</syntaxhighlight>
 

Latest revision as of 17:34, 19 February 2020

Summary
[edit]

The GLSL MAT allows you to write or import custom materials into TouchDesigner. When there are compile errors in a GLSL shader, a blue/red checkerboard error shader will be displayed.

For more information on writing a shader, see Write a GLSL Material, and the GLSL Category.

PythonIcon.pngglslMAT_Class


Parameters - Load Page

GLSL Version glslversion - - Pick what version of GLSL to compile the shader with.

  • 1.20 glsl120 -
  • 3.30 glsl330 -
  • 4.00 glsl400 -
  • 4.10 glsl410 -
  • 4.20 glsl420 -
  • 4.30 glsl430 -
  • 4.40 glsl440 -
  • 4.50 glsl450 -
  • 4.60 glsl460 -

Preprocess Directives predat -  

Vertex Shader vdat - Path to the DAT that holds the vertex shader code.  

Pixel Shader pdat - Path to the DAT that holds the pixel shader code.  

Load Uniform Names loaduniformnames - This will read all the declared (and used) uniforms in the compiled GLSL shader, and fill in the various name fields for the uniform parameters.  

Clear Uniform Names clearuniformnames - This will clear all of the name fields for the uniform parameters.  

Geometry Shader gdat - Path to the DAT that holds the geometry shader code.  

Input Primitive Type inprim - - The type of geometry that will be inputed into the Geometry Shader.

  • Points points -
  • Lines lines -
  • Triangles triangles -

Output Primitive Type outprim - - The type of geometry that the Geometry Shader will output.

  • Points points -
  • Line Strip linestrip -
  • Triangle Strip tristrip -

Num Output Vertices numout - The maximum number of vertices the Geometry Shader will output.  

Two Sided Coloring twocolor - Enables support for two-sided coloring. When this is enabled the Vertex and/or Geometry shader can write to gl_FrontColor, gl_BackColor, gl_FrontSecondaryColor and gl_BackSecondaryColor and the correct color will be placed into gl_Color and gl_SecondaryColor in the Pixel shader depending on if the primitive's front face or back face is facing the camera. When this is disabled the values placed into gl_FrontColor and gl_FrontSecondaryColor are passed to gl_Color and gl_SecondaryColor regardless of which side of the primitive is facing the camera.  

Inherit Uniforms/Samplers from inherit - This Material will inherit all of the Textures and Uniforms from the GLSL Material referenced in this parameter.  

Lighting Space lightingspace - - Allows lighting space switch from the current default World Space to legacy Camera Space which was used for TouchDesigner 088.

  • World Space worldspace -
  • Camera Space (Legacy 088 shaders) cameraspace -


Parameters - Samplers Page

Sampler Name 0 sampler0 - This is the sampler name that the GLSL program will use to sample from this TOP. The samplers need to be declared at the same dimentions as the TOP (sampler2D for a 2D TOP, sampler3D for 3D TOP).  

TOP top0 - - This is the TOP that will be referenced by the above sampler name above it.

Exposed by the + Button, texture sampling parameters:

Refer to the Texture Sampling Parameters article for more information on the parameters exposed by pressing the + button. The parameter prefix for each of the parameters is top[digit].

Extend U top0extendu - -

  • Hold hold -
  • Zero zero -
  • Repeat repeat -
  • Mirror mirror -

Extend V top0extendv - -

  • Hold hold -
  • Zero zero -
  • Repeat repeat -
  • Mirror mirror -

Extend W top0extendw - -

  • Hold hold -
  • Zero zero -
  • Repeat repeat -
  • Mirror mirror -

Filter top0filter - -

  • Nearest nearest -
  • Linear linear -
  • Mipmap Linear mipmaplinear -

Anisotropic Filter top0anisotropy - -

  • Off off -
  • 2x 2x -
  • 4x 4x -
  • 8x 8x -
  • 16x 16x -


Parameters - Vectors Page

Uniform Name 0 uniname0 - The name of the uniform.  

Value value0 - - The value to assign to the uniform. If the uniform is a float the first entry of the four is used, if the uniform is a vec2 the first two entries are used, etc.

  • Value value0x -
  • Value value0y -
  • Value value0z -
  • Value value0w -


Parameters - Arrays Page

CHOP Uniforms allow you to send CHOP channel data into a GLSL shader as an array. Depending on the array type used, the number of values you can send into the shader may be limited. If you are using Uniform Arrays, you can use the Built-In variable $SYS_GFX_GLSL_MAX_UNIFORMS to get an idea of how many values you can pass to the shader. Current GPUs are vec4 based for uniform arrays, so the maximum array size is $SYS_GFX_GLSL_MAX_UNIFORMS / 4. Other uniforms will take away from this maximum. If you are using Texture Buffers the maximum array size is far bigger, $SYS_GFX_MAX_TEXTURE_BUFFER_SIZE will tell you the max for this. The max for texture buffer is per texture buffer, and having multiple texture buffers does not take away from the max for each array.

Uniform Name 0 chopuniname0 - The name of the uniform.  

Type chopunitype0 - - The type of the uniform. You can send up to 4 channels into the GLSL shader in a single uniform. For a CHOP with a single channel declare your uniform as a float, for one with two channels declare your uniform as a vec2, etc. The data is interleaved in the uniform. I.e., the .x component is the 1st channel, .y is the 2nd channel, etc.

  • float float -
  • vec2 vec2 -
  • vec3 vec3 -
  • vec4 vec4 -

CHOP chop0 - The CHOP whose channels will be sent to the GLSL shader.  

Array Type choparraytype0 - - GPUs can send array data into a GLSL shader using Uniform Arrays or Texture Buffers. A Uniform Array uses very limited memory to store its data, and can be access like any other regular uniform value (but in an array). Texture Buffers use texture memory and texture fetches to access the data, which allows them to store many more values.

In both cases the index is the 0-based index (an integer) into the array/buffer that you want to get a value for.

  • Uniform Array uniformarray - A Uniform Array is declared and used like this:
// Array type is vec3, and it takes up to 20 values from the CHOP				
uniform vec3 arrayName[20];				
// Grab the value at index 10				
vec3 aValue = arrayName[10];
  • Texture Buffer texturebuffer - A Texture Buffer is declared and used like this:
// A texture buffer will also be a vec4, but only the first 1, 2, 3 or 4 component will contain data, depending on the type you choose.				
uniform samplerBuffer arrayName;				
// sampler the value at index 10. It be default returns a vec4, so change it to a vec3 in this example using .xyz				
vec3 aValue = texelFetch(arrayName, 10).xyz;

Channel Scope chanscope0 - - You can select which channels from the CHOP will be used to fill the array. Up to the first 4 channels scoped will be used (depending on the type of the uniform array).

  • * * -


Parameters - Matrices Page

Relative Xforms are matrices that will transform points and vectors from one space to another space.

Uniform Name 0 matuniname0 - The name of the uniform. The uniform should be declared as a mat4.  

Matrix 0 matvalue0 -  

Uniform Name 0 unimatrixname0 - The name of the uniform. The uniform should be declared as a mat4.  

Xform from fromcomp0 - Transform from this COMPs world transform.  

To tocomp0 - Transform to this COMPs world transform.  


Parameters - Deform Page

Refer to the Deform Article for more information on doing deforms in TouchDesigner.

Deform dodeform - Enables deforms on this material.  

Get Bone Data: deformdata - - Specifies where the deform bone data will be obtained.

  • From a SOP sop -
  • From another MAT mat -
  • From a DeformIn MAT deformin -

SOP with Capture Data targetsop - Specifies the SOP that contains the deform capture attributes.  

pCaptPath Attrib pcaptpath - Specifies the name of the pCaptPath attribute to use. When your geometry has been put through a Bone Group SOP, the attributes will be split into names like pCaptPath0, pCaptPath1. You can only render 1 bone group at a time, so this should match the group you are rendering with this material.  

pCaptData Attrib pcaptdata - Much like pCaptPath Attrib.  

Skeleton Root Path skelrootpath - Specifies the path to the COMP where the root of the skeleton is located.  

MAT mat - When obtaining deform data from a MAT or a Deform In MAT, this is where that MAT is specified.  


Parameters - Common Page

Blending

Blending is summing the color value of the pixel being drawn and the pixel currently present in the Color-Buffer. Blending is typically used to simulate Transparency. The blending equation is: Final Pixel Value = (Source Blend * Source Color) + (Dest Blend * Destination Color)


Blending(Transparency) blending - This toggle enables and disables blending. However see the wiki article Transparency.  

Source Color * srcblend - - This value is multiplied by the color value of the pixel that is being written to the Color-Buffer (also know as the Source Color).

  • Zero zero -
  • Dest Color dcol -
  • One Minus Dest Color omdcol -
  • Source Alpha sa -
  • One Minus Source Alpha omsa -
  • Dest Alpha da -
  • One Minus Dest Alpha omda -
  • Source Alpha Saturate sas -
  • One one -

Destination Color * destblend - - This value is multiplied by the color value of the pixel currently in the Color-Buffer (also known as the Destination Color).

  • One one -
  • Src Color scol -
  • One Minus Src Color omscol -
  • Source Alpha sa -
  • One Minus Source Alpha omsa -
  • Dest Alpha da -
  • One Minus Dest Alpha omda -
  • Zero zero -

Separate Alpha Function separatealphafunc - This toggle enables and disables separate blending options for the alpha values.  

Source Alpha * srcblenda - - This value is multiplied by the alpha value of the pixel that is being written to the Color-Buffer (also know as the Source Alpha).

  • Zero zero -
  • Dest Color dcol -
  • One Minus Dest Color omdcol -
  • Source Alpha sa -
  • One Minus Source Alpha omsa -
  • Dest Alpha da -
  • One Minus Dest Alpha omda -
  • Source Alpha Saturate sas -
  • One one -

Destination Alpha * destblenda - - This value is multiplied by the alpha value of the pixel currently in the Color-Buffer (also known as the Destination Alpha).

  • One one -
  • Src Color scol -
  • One Minus Src Color omscol -
  • Source Alpha sa -
  • One Minus Source Alpha omsa -
  • Dest Alpha da -
  • One Minus Dest Alpha omda -
  • Zero zero -

Depth Test

Depth-Testing is comparing the depth value of the pixel being drawn with the pixel currently in the Frame-Buffer. A pixel that is determined to be in-front of the pixel currently in the Frame-Buffer will be drawn over it. Pixels that are determined to be behind the pixel currently in the Frame-Buffer will not be drawn. Depth-Testing allows geometry in a 3D scene to occlude geometry behind it, and be occluded by geometry in-front of it regardless of the order the geometry was drawn.

For a more detailed description of Depth-Testing, refer to the Depth-Test article.


Depth Test depthtest - Enables and disables the Depth-Test. If the depth-test is disabled, depths values aren't written to the Depth-Buffer.  

Depth Test Function depthfunc - - The depth value of the pixel being drawn is compared to the depth value currently in the depth-buffer using this function. If the test passes then the pixel is drawn to the Frame-Buffer. If the test fails the pixel is discarded and no changes are made to the Frame-Buffer.

  • Less Than less -
  • Less Than or Equal lessorequal -
  • Equal equal -
  • Greater Than greater -
  • Greater Than or Equal greaterorequal -
  • Not Equal notequal -
  • Always always -

Write Depth Values depthwriting - If Write Depth Values is on, pixels that pass the depth-test will write their depth value to the Depth-Buffer. If this isn't on then no changes will be made to the Depth-Buffer, regardless of if the pixels drawn pass or fail the depth-test.  

Alpha Test

Alpha-testing allows you to choose to draw or not draw a pixel based on its alpha value.


Discard Pixels Based on Alpha alphatest - This enables or disables the pixel alpha test.  

Keep Pixels with Alpha alphafunc - - This menu works in conjunction with the Alpha Threshold parameter below in determining which pixels to keep based on their alpha value.

  • Less Than less -
  • Less Than or Equal lessorequal -
  • Greater Than greater -
  • Greater Than or Equal greaterorequal -

Alpha Threshold alphathreshold - This value is what the pixel's alpha is compared to to determine if the pixel should be drawn. Pixels with alpha greater than the Alpha Threshold will be drawn. Pixels with alpha less than or equal to the Alpha Threshold will not be drawn.  

Wire Frame

The wire-frame feature will render the geometry as wire-frame, using the actual primitive type used in the render. What this means is surfaces like Metaballs, NURBs and Beziers will become a wire-frame of the triangles/triangle-strips used to render them (since these types of primitives can't be natively rendered in OpenGL).


Wire Frame wireframe - - Enables and disables wire-frame rendering with the option of OpenGL Tesselated or Topology based wireframes.

  • Off off -
  • OpenGL Tesselated Wire Frame tesselated -
  • Topology Wire Frame topology -

Line Width wirewidth - This value is the width that the wires will be. This value is in pixels.  

Cull Face

The cull face parameter will cull faces from the render output. This can be used as an optimization or sometimes to remove artifacts. See Back-Face Culling for more infomation.


Cull Face cullface - - Selects which faces to render.

  • Use Render Setting userender - Use the render settings found in the Render or Render Pass TOP.
  • Neither neither - Do not cull any faces, render everything.
  • Back Faces backfaces - Cull back faces, render front faces.
  • Front Faces frontfaces - Cull front faces, render back faces.
  • Both Faces bothfaces - Cull both faces, render nothing.

Polygon Depth Offset

This feature pushes the polygons back into space a tiny fraction. This is useful when you are rendering two polygons directly on-top of each other and are experiencing Z-Fighting. Refer to Polygon Depth Offset for more information. This is also an important feature when doing shadows.


Polygon Depth Offset polygonoffset - Turns on the polygon offset feature.  

Offset Factor polygonoffsetfactor -  

Offset Units polygonoffsetunits -  

TouchDesigner Build:

MATs
Constant • Depth • GLSL • In • Line • MAT • MAT Common age • Null • Out • PBR • Phong • Point Sprite • Select • Switch • Texture Sampling arameters • Wireframe

An Operator Family that associates a shader with a SOP or Geometry Object for rendering textured and lit objects.

The OpenGL code that creates a rendered image from polygons and textures. Shaders can be made of up to three parts: Vertex Shader, Geometry Shader and/or Pixel Shader, which are either embedded inside Materials, or placed in Text DATs and referenced to a GLSL Material.

The location of an operator within the TouchDesigner environment, for example, /geo1/torus1, a node called torus1 in a component called geo1. The path / is called Root. To refer instead to a filesystem folder, directory, disk file or http: address, see Folder.

An Operator Family that manipulates text strings: multi-line text or tables. Multi-line text is often a command Script, but can be any multi-line text. Tables are rows and columns of cells, each containing a text string.

A surface type in SOPs including polygon, curve (NURBS and Bezier), patch (NURBS and Bezier) and other shapes like sphere, tube, and metaball. Points and Primitives are part of the Geometry Detail, which is a part of a SOP.

An Operator Family that associates a shader with a SOP or Geometry Object for rendering textured and lit objects.

An Operator Family that creates, composites and modifies images, and reads/writes images and movies to/from files and the network. TOPs run on the graphics card's GPU.

Operators that have 1 or more input, like a Math CHOP, are called filters. See Generator.

An Operator Family which operate on Channels (a series of numbers) which are used for animation, audio, mathematics, simulation, logic, UI construction, and many other applications.

A parameter in most CHOPs that restricts which channels of that CHOP will be affected. Normally all channels of a CHOP are affected by the operator.

An Operator Family that reads, creates and modifies 3D polygons, curves, NURBS surfaces, spheres, meatballs and other 3D surface data.

TouchDesigner is a hierarchy of components. "root" is the top-most network in the hierarchy. The Path is simply /. A typical path is /project1/moviein1.

An Operator Family that contains its own Network inside. There are twelve 3D Object Component and eight 2D Panel Component types. See also Network Path.

The term "Frame" is used (1) in the Timeline, (2) as a time-unit in CHOPs, (3) as a time-unit in TOPs, and (4) with movies images which are read and created with TOPs.

The connection of an output of one node to the input of another node in a network. In contrast, see Link.