diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-11-11 16:27:08 -0800 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-11-11 16:27:08 -0800 |
commit | 84ab08d2a5ac59ea2681e3dea0e0bc48e3d99de5 (patch) | |
tree | 4625f752d73b46de471045f39e2937baa1ae40b4 /indra/newview/app_settings/shaders/class2 | |
parent | e2e154d94ea0684ede8c7c1b70fff555edbd6065 (diff) |
Assorted shader cleanup to remove a few warnings and errors for OS X.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
3 files changed, 9 insertions, 12 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl index 7e62012b5d..229c2f4b67 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl @@ -99,15 +99,15 @@ float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl) stc.xyz /= stc.w; stc.z += spot_shadow_bias*scl; - float cs = shadow2D(shadowMap, stc.xyz); + float cs = shadow2D(shadowMap, stc.xyz).x; float shadow = cs; vec2 off = 1.5/proj_shadow_res; - shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, off.y, 0.0)), cs); - shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)), cs); - shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)), cs); - shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, -off.y, 0.0)), cs); + shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, off.y, 0.0)).x, cs); + shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)).x, cs); + shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)).x, cs); + shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, -off.y, 0.0)).x, cs); return shadow/5.0; diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl index 025ff48109..fc19f15e02 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl @@ -155,10 +155,10 @@ float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl) vec2 off = 1.5/proj_shadow_res; - shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, off.y, 0.0)), cs); - shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)), cs); - shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)), cs); - shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, -off.y, 0.0)), cs); + shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, off.y, 0.0)).x, cs); + shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)).x, cs); + shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)).x, cs); + shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, -off.y, 0.0)).x, cs); return shadow/5.0; diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl index b768cc9cf3..46773cf89f 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl @@ -26,7 +26,6 @@ uniform mat4 modelview_projection_matrix; ATTRIBUTE vec3 position; -ATTRIBUTE vec2 texcoord0; // SKY //////////////////////////////////////////////////////////////////////// // The vertex shader for creating the atmospheric sky @@ -34,7 +33,6 @@ ATTRIBUTE vec2 texcoord0; // Output parameters VARYING vec4 vary_HazeColor; -VARYING vec2 vary_texcoord0; // Inputs uniform vec3 camPosLocal; @@ -62,7 +60,6 @@ void main() // World / view / projection gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); - vary_texcoord0 = texcoord0; // Get relative position vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0); |