summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl22
1 files changed, 14 insertions, 8 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl
index b90cec119b..4ab06c6e21 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl
@@ -23,15 +23,21 @@
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#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;
+VARYING vec2 vary_texcoord0;
+VARYING vec2 vary_texcoord1;
+VARYING vec2 vary_texcoord2;
+VARYING vec2 vary_texcoord3;
uniform sampler2D cloud_noise_texture;
uniform vec4 cloud_pos_density1;
@@ -50,14 +56,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