summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-11-06 19:33:04 +0000
committerGraham Linden <graham@lindenlab.com>2018-11-06 19:33:04 +0000
commit2929998982f37221a58b9fa8037748a2e905f4b1 (patch)
tree24cc0c3da6655e9ed98908baa524e72068fbd64d /indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
parent8c1aefc17c710b55ed7a72bd9de14cbed58ccd31 (diff)
Move to using a shared deferredUtil object for getting pos/norm from gbuffer.
Eliminate 20+ callsites with copy-paste of getPosition and/or getNorm code. Make pipeline use getShadowTarget/releaseShadowTarget consistently.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl14
1 files changed, 1 insertions, 13 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
index 13b803e03e..df48a66fab 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
@@ -57,19 +57,7 @@ uniform mat4 inv_proj;
uniform vec4 viewport;
vec3 decode_normal (vec2 enc);
-
-vec4 getPosition(vec2 pos_screen)
-{
- float depth = texture2DRect(depthMap, pos_screen.xy).r;
- vec2 sc = (pos_screen.xy-viewport.xy)*2.0;
- sc /= viewport.zw;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
+vec4 getPosition(vec2 pos_screen);
void main()
{