Type | function |
Library | shader.* |
Return value | string |
Visual Guide | Visual Guide |
Switches between tbe Dynamic Shader's two light type settings.
the default setting is directional light
1 point light is currently in BETA
shader.switchLightType( )
returns lightType, lightTypeName
- lightType = "composite.normalMapWith1DirLight" or "composite.normalMapWith1PointLight"
- lightTypeName = "directional light" or "1 point light"
local shader = require 'plugin.dynamic-shader'
-- example with no return values
shader.switchLightType( )
-- example with return values
local lightType, lightTypeName = shader.switchLightType( )
print(lightType)
-- OUTPUT: "composite.normalMapWith1DirLight"
print(lightTypeName)
-- OUTPUT: "directional light"