Skip to content

Latest commit

 

History

History
35 lines (20 loc) · 1.09 KB

setIntensity.markdown

File metadata and controls

35 lines (20 loc) · 1.09 KB

shader.setIntensity()

 
Type function
Library shader.*
See also setAlpha(), setZValue(), setConstant(), setLinear(), setQuadratic()
Visual Guide Visual Guide

Overview

Used to set the intensity of the light source added to the Dynamic Shader via addLight()

Syntax

shader.setIntensity( number )

number is a value between 0 and 1

Examples

local shader = require 'plugin.dynamic-shader'

shader.setIntensity( 0.5 ) -- sets the light intensity for the Dynamic Shader to 50%

local lightTable = shader.getLightTable() -- get the current Dynamic Shader values

print(lightTable.intensity)
-- OUTPUT: 0.5