< Previous | Contents | Next >

Returns

The function should return true, if successful. Returning false will cause the shader chain to be rebuilt, and FreeShader() then SetupShadeNode() will be called again. If SetupShadeNode() also returns nil, the ScriptViewShader will be bypassed completely until the user re-enables it.

Example


-- This is called every display refresh

-- img may be nil

function SetupParams(req, vsnode, img)


-- retrieve control values

local gamma = InGamma:GetValue(req).Value local alphagamma = InAlphaGamma:GetValue(req).Value


-- and setup the shader’s parameter values vsnode:Set(1, gamma)

vsnode:Set(2, alphagamma)


return true

end