diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-05-17 18:09:36 -0500 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-05-17 18:09:36 -0500 |
commit | c827d32ebedeaa46ed75a91ae779f6547fc0d090 (patch) | |
tree | 0196248e4d7a2e42b36ab1189408ac3ea99c43e9 /indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl | |
parent | a2e418f250c49de9aba943a62f92189fcef6220a (diff) |
SL-19655 Decruft legacy GLSL shaders and now unused build queues.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl index d9c0e590c8..3b9b8ae696 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl @@ -23,15 +23,9 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable - /*[EXTRA_CODE_HERE]*/ -#ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif uniform sampler2D diffuseRect; uniform sampler2D lightMap; @@ -44,14 +38,14 @@ uniform float res_scale; uniform float dof_width; uniform float dof_height; -VARYING vec2 vary_fragcoord; +in vec2 vary_fragcoord; vec4 dofSample(sampler2D tex, vec2 tc) { tc.x = min(tc.x, dof_width); tc.y = min(tc.y, dof_height); - return texture2D(tex, tc); + return texture(tex, tc); } void main() @@ -60,7 +54,7 @@ void main() vec4 dof = dofSample(diffuseRect, vary_fragcoord.xy*res_scale); - vec4 diff = texture2D(lightMap, vary_fragcoord.xy); + vec4 diff = texture(lightMap, vary_fragcoord.xy); float a = min(abs(diff.a*2.0-1.0) * max_cof*res_scale*res_scale, 1.0); @@ -69,10 +63,10 @@ void main() float sc = a/res_scale; vec4 col; - col = texture2D(lightMap, vary_fragcoord.xy+vec2(sc,sc)/screen_res); - col += texture2D(lightMap, vary_fragcoord.xy+vec2(-sc,sc)/screen_res); - col += texture2D(lightMap, vary_fragcoord.xy+vec2(sc,-sc)/screen_res); - col += texture2D(lightMap, vary_fragcoord.xy+vec2(-sc,-sc)/screen_res); + col = texture(lightMap, vary_fragcoord.xy+vec2(sc,sc)/screen_res); + col += texture(lightMap, vary_fragcoord.xy+vec2(-sc,sc)/screen_res); + col += texture(lightMap, vary_fragcoord.xy+vec2(sc,-sc)/screen_res); + col += texture(lightMap, vary_fragcoord.xy+vec2(-sc,-sc)/screen_res); diff = mix(diff, col*0.25, a); } |