HTML5 Canvas 3D WebGL (TM) javaScript Library
 

setLighting Library Method

Signature: sc.setLighting (ena,perVertex)
Class: taccglShaderConfig Class
 

ena and perVertex must be boolean values. If ena=false the shaders do not perform any lighting calculation. If ena=true then perVertex can be used to select between lighting calculations per Vertex or per Fragment. However even if per fragment lighting is selected taccgl™ will also make an additional perVertex shader and use it if the performance requires.

Per default lighting per Fragment is enabled. If there are problems compiling shaders, lighting is disabled.

WebGL™ is a trademark of the Khronos Group Inc.