diff options
| author | Dave Parks <davep@lindenlab.com> | 2011-10-19 16:21:18 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2011-10-19 16:21:18 -0500 |
| commit | f19f43c74606e1f158cdabe9e783f9c82386b7b7 (patch) | |
| tree | 64c1a6d7d1d8a1ae0b30baf6bd519d8140136971 /indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl | |
| parent | dd61baa3401a09bd8ff1e894514c15390946cdb3 (diff) | |
| parent | 4ec72ed0a61157dd5fcc1bc4cc91054664ee75b5 (diff) | |
merge
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl')
| -rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl index f4310dae95..73e726fe15 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl @@ -24,20 +24,28 @@ */ +#ifndef gl_FragData +out vec4 gl_FragData[3]; +#endif ///////////////////////////////////////////////////////////////////////// // The fragment shader for the sky ///////////////////////////////////////////////////////////////////////// -varying vec4 vary_CloudColorSun; -varying vec4 vary_CloudColorAmbient; -varying float vary_CloudDensity; +VARYING vec4 vary_CloudColorSun; +VARYING vec4 vary_CloudColorAmbient; +VARYING float vary_CloudDensity; uniform sampler2D cloud_noise_texture; uniform vec4 cloud_pos_density1; uniform vec4 cloud_pos_density2; uniform vec4 gamma; +VARYING vec2 vary_texcoord0; +VARYING vec2 vary_texcoord1; +VARYING vec2 vary_texcoord2; +VARYING vec2 vary_texcoord3; + /// Soft clips the light with a gamma correction vec3 scaleSoftClip(vec3 light) { //soft clip effect: @@ -50,14 +58,14 @@ vec3 scaleSoftClip(vec3 light) { void main() { // Set variables - vec2 uv1 = gl_TexCoord[0].xy; - vec2 uv2 = gl_TexCoord[1].xy; + vec2 uv1 = vary_texcoord0.xy; + vec2 uv2 = vary_texcoord1.xy; vec4 cloudColorSun = vary_CloudColorSun; vec4 cloudColorAmbient = vary_CloudColorAmbient; float cloudDensity = vary_CloudDensity; - vec2 uv3 = gl_TexCoord[2].xy; - vec2 uv4 = gl_TexCoord[3].xy; + vec2 uv3 = vary_texcoord2.xy; + vec2 uv4 = vary_texcoord3.xy; // Offset texture coords uv1 += cloud_pos_density1.xy; //large texture, visible density |
