diff options
author | Dave Parks <davep@lindenlab.com> | 2023-02-14 10:10:12 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2023-02-14 10:10:12 -0600 |
commit | 68c4ff7dce2bd519431238f6209238aba46dc0ba (patch) | |
tree | 8b4135011990ebf30aa29dc511c47bdaa2d2c92d /indra/newview/app_settings/shaders | |
parent | c87c1a1fa433904a4e77b6993827f344805d77a1 (diff) |
SL-18762 Fix for broken local lights on alpha when wearing a HUD attachment. Also fix stuck sun/moon and incidental decruft.
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/moonV.glsl | 6 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl | 20 |
2 files changed, 13 insertions, 13 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/moonV.glsl b/indra/newview/app_settings/shaders/class1/deferred/moonV.glsl index 7b9aa0a4dc..032245a01c 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/moonV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/moonV.glsl @@ -27,10 +27,10 @@ uniform mat4 texture_matrix0; uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; -ATTRIBUTE vec3 position; -ATTRIBUTE vec2 texcoord0; +in vec3 position; +in vec2 texcoord0; -VARYING vec2 vary_texcoord0; +out vec2 vary_texcoord0; void main() { diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl index cd49202f89..fffbdb913e 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl @@ -59,12 +59,12 @@ float pcfShadow(sampler2DShadow shadowMap, vec3 norm, vec4 stc, float bias_mul, stc.xyz /= stc.w; stc.z += offset * 2.0; stc.x = floor(stc.x*shadow_res.x + fract(pos_screen.y*shadow_res.y))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here - float cs = shadow2D(shadowMap, stc.xyz).x; + float cs = texture(shadowMap, stc.xyz).x; float shadow = cs * 4.0; - shadow += shadow2D(shadowMap, stc.xyz+vec3( 1.5/shadow_res.x, 0.5/shadow_res.y, 0.0)).x; - shadow += shadow2D(shadowMap, stc.xyz+vec3( 0.5/shadow_res.x, -1.5/shadow_res.y, 0.0)).x; - shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.5/shadow_res.x, -0.5/shadow_res.y, 0.0)).x; - shadow += shadow2D(shadowMap, stc.xyz+vec3(-0.5/shadow_res.x, 1.5/shadow_res.y, 0.0)).x; + shadow += texture(shadowMap, stc.xyz+vec3( 1.5/shadow_res.x, 0.5/shadow_res.y, 0.0)).x; + shadow += texture(shadowMap, stc.xyz+vec3( 0.5/shadow_res.x, -1.5/shadow_res.y, 0.0)).x; + shadow += texture(shadowMap, stc.xyz+vec3(-1.5/shadow_res.x, -0.5/shadow_res.y, 0.0)).x; + shadow += texture(shadowMap, stc.xyz+vec3(-0.5/shadow_res.x, 1.5/shadow_res.y, 0.0)).x; return clamp(shadow * 0.125, 0.0, 1.0); #else return 1.0; @@ -78,16 +78,16 @@ float pcfSpotShadow(sampler2DShadow shadowMap, vec4 stc, float bias_scale, vec2 stc.z += spot_shadow_bias * bias_scale; stc.x = floor(proj_shadow_res.x * stc.x + fract(pos_screen.y*0.666666666)) / proj_shadow_res.x; // snap - float cs = shadow2D(shadowMap, stc.xyz).x; + float cs = texture(shadowMap, stc.xyz).x; float shadow = cs; vec2 off = 1.0/proj_shadow_res; off.y *= 1.5; - shadow += shadow2D(shadowMap, stc.xyz+vec3(off.x*2.0, off.y, 0.0)).x; - shadow += shadow2D(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)).x; - shadow += shadow2D(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)).x; - shadow += shadow2D(shadowMap, stc.xyz+vec3(-off.x*2.0, -off.y, 0.0)).x; + shadow += texture(shadowMap, stc.xyz+vec3(off.x*2.0, off.y, 0.0)).x; + shadow += texture(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)).x; + shadow += texture(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)).x; + shadow += texture(shadowMap, stc.xyz+vec3(-off.x*2.0, -off.y, 0.0)).x; return shadow*0.2; #else return 1.0; |