Skip to content

Latest commit

 

History

History
48 lines (30 loc) · 1.75 KB

switchLightType.markdown

File metadata and controls

48 lines (30 loc) · 1.75 KB

shader.switchLightType()

 
Type function
Library shader.*
Return value string
Visual Guide Visual Guide

Overview

Switches between tbe Dynamic Shader's two light type settings.

the default setting is directional light

1 point light is currently in BETA

Syntax

shader.switchLightType( )

returns lightType, lightTypeName

Examples

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"