Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 1001 Bytes

setLightColor.markdown

File metadata and controls

40 lines (25 loc) · 1001 Bytes

shader.setLightColor()

 
Type function
Library shader.*
Visual Guide Visual Guide

Overview

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

Syntax

shader.setLightColor( table )
table (required)

Table with RGB values

Format for table

table = {r, g, b}

  • r = red value (0 to 1)
  • g = green value (0 to 1)
  • b = red value (0 to 1)

alpha values are set by setAlpha()

Examples

local shader = require 'plugin.dynamic-shader'

local table = {1, 1, 1}
shader.setLightColor( table )
-- sets Dynamic Shader color to white