From 26df2b941e64bc62c3f822d130d7dbc0f2bfc8e4 Mon Sep 17 00:00:00 2001 From: Adam Moss Date: Sat, 21 Apr 2012 18:42:47 +0100 Subject: STORM-1819: Ternary/graded shadow support cleanup: get rid of the no-op 'mex' function in the shaders which was being used as a dummy replacement for 'mix' --- .../app_settings/shaders/class2/deferred/alphaF.glsl | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl') diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl index a8a3d3efc1..8db4cb58cf 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl @@ -58,11 +58,6 @@ uniform float shadow_bias; uniform mat4 inv_proj; -float mex(float a, float b) -{ - return a; -} - float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc) { stc.xyz /= stc.w; @@ -73,10 +68,10 @@ float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc) float cs = shadow2DRect(shadowMap, stc.xyz).x; float shadow = cs; - shadow += mex(shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x,cs); - shadow += mex(shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x,cs); - shadow += mex(shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x,cs); - shadow += mex(shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x,cs); + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x; return shadow*0.2; } -- cgit v1.2.3