diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/lighting/lightF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/lighting/lightF.glsl | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightF.glsl new file mode 100644 index 0000000000..0ef1129253 --- /dev/null +++ b/indra/newview/app_settings/shaders/class2/lighting/lightF.glsl @@ -0,0 +1,36 @@ +void applyScatter(inout vec3 color); + +uniform sampler2D diffuseMap; + +void default_lighting() +{ + vec4 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy); + applyScatter(color.rgb); + gl_FragColor = color; +} + +void alpha_lighting() +{ + vec4 diff = texture2D(diffuseMap, gl_TexCoord[0].xy); + vec3 color = gl_Color.rgb * diff.rgb; + applyScatter(color); + gl_FragColor.rgb = color; + gl_FragColor.a = diff.a * gl_Color.a; +} + +void water_lighting(inout vec3 diff) +{ + diff = (diff*0.9 + gl_Color.rgb*0.1); + applyScatter(diff); +} + +void terrain_lighting(inout vec3 color) +{ + color.rgb *= gl_Color.rgb; + applyScatter(color); +} + +vec4 getLightColor() +{ + return gl_Color; +}
\ No newline at end of file |