Skip to content

Latest commit

 

History

History
35 lines (20 loc) · 1.12 KB

setZValue.markdown

File metadata and controls

35 lines (20 loc) · 1.12 KB

shader.setZValue()

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

Overview

Used to set the position of the z-axis of the light source added to the Dynamic Shader via addLight()

Syntax

shader.setZValue( number )

number is a value between 0 and 1

Examples

local shader = require 'plugin.dynamic-shader'

shader.setZValue( 0.5 ) -- sets the position of the z-axis for the light used by the Dynamic Shader

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

print(lightTable.zValue)
-- OUTPUT: 0.5