Type | function |
Library | shader.* |
See also | setIntensity(), setZValue(), setConstant(), setLinear(), setQuadratic() |
Visual Guide | Visual Guide |
Used to set the alpha value of the light source added to the Dynamic Shader via addLight()
shader.setAlpha( number )
number is a value between 0 and 1
local shader = require 'plugin.dynamic-shader'
shader.setAlpha( 0.5 ) -- sets the alpha value for the Dynamic Shader to 50%
local lightTable = shader.getLightTable() -- get the current Dynamic Shader values
print(lightTable.alpha)
-- OUTPUT: 0.5