Skip to content

Latest commit

 

History

History
35 lines (20 loc) · 1.08 KB

setAlpha.markdown

File metadata and controls

35 lines (20 loc) · 1.08 KB

shader.setAlpha()

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

Overview

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

Syntax

shader.setAlpha( number )

number is a value between 0 and 1

Examples

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