GE Lua Documentation

Press F to search!

setShaderConsts

Definition


-- @/lua/ge/client/postFx/lightRay.lua:56

lightRayPostFXCallbacks.setShaderConsts = function()
  local lightRayPostFX = scenetree.findObject("LightRayPostFX")
  if not lightRayPostFX then
    return
  end

  lightRayPostFX:setShaderConst("$brightScalar", TorqueScriptLua.getVar("$LightRayPostFX::brightScalar"))
  local pfx = lightRayPostFX:findObjectByInternalName("final")-- scenetree.findObject("final")
  pfx = Sim.upcast(pfx)
  pfx:setShaderConst("$numSamples", TorqueScriptLua.getVar("$LightRayPostFX::numSamples"))
  pfx:setShaderConst("$density", TorqueScriptLua.getVar("$LightRayPostFX::density"))
  pfx:setShaderConst("$weight", TorqueScriptLua.getVar("$LightRayPostFX::weight"))
  pfx:setShaderConst("$decay", TorqueScriptLua.getVar("$LightRayPostFX::decay"))
  pfx:setShaderConst("$exposure", TorqueScriptLua.getVar("$LightRayPostFX::exposure"))
end

Callers