Reply To: How to modify water shaders

Home Forums AR Sandbox Forum How to modify water shaders Reply To: How to modify water shaders

#113676
Oliver Kreylos
Keymaster

Colors in GLSL have four components: red, green, blue, and alpha (opacity). All component values are normalized from 0.0 to 1.0. Alpha is usually 1.0. I.e., black is (0.0, 0.0, 0.0, 1.0) and white is (1.0, 1.0, 1.0, 1.0).

vec4 waterColor=vec4(colorW,colorW,1.0,1.0); creates a color between blue when colorW is 0.0 and white when colorW is larger than 1.0.

Comments are closed.