You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lightWorld=LightWorld({
--options
})
lightWorld.post_shader:addEffect("black_and_white")
-- now the call to lightworld:draw() will have the black and white postshader active
This will refresh the canvas sizes needed for postshader rendering. If you are using postshaders with the light world you do not need to call this if you are already calling lightWorld:refreshScreenSize()
:addEffect(shaderName, ...)
adds the postshader by the shader name and the rest of the arguments are those that are delegated to the postshader
shaderName refers to the shader file name to user so if it is scanlines.glsl the shader name will be "scanlines"
The arguments correspond to the extern variables in the shaders, in order. (variables like screen are filled in automtically by the postshader)
:removeEffect(shaderName)
remove postshader from being active by name
:toggleEffect(shaderName, ...)
if the shader is active it will become inactive, if the shader has not been added then it will be added
:drawWith(canvas)
apply the postshader effect onto the canvas provided