< Previous | Contents | Next >

Constructor

ViewShadeNode Constructs a new ViewShadeNode object. This requires four arguments:


group

This is the ViewShadeNodeGroup passed to the SetupShadeNode() function.

name

This is an identifying name string.

params

This is a string containing a list of parameter types and names, one per line.

Types can include the following: float

vec2 vec3 vec4 mat4

shader

This is a string with the GLSL source for your shader program


Methods


Set

Sets the value of numeric parameters. Can be given a single number, or up to four values for a vector, or a Matrix4.

SetImage

Used to pass an Image to the shader as a texture.


Example


function SetupShadeNode(group, req, img)

-- pass group, name, params string, and shader source return ViewShadeNode(group, "GammaFuse", params, shader) end