diff options
author | Graham Linden <graham@lindenlab.com> | 2018-12-06 10:59:11 -0800 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-12-06 10:59:11 -0800 |
commit | 7e9033821a96a9d6e80b58fafb4c7da63807b9d4 (patch) | |
tree | d1c267539a601f2b000e1ad9f6f252ad3c5fe77c /indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl | |
parent | 26c1430a04de585c1823569b60dc99abc798231b (diff) |
De-duplicate deferred gbuffer access for getPosition/getNorm.
De-duplicate ambient occlusion shader code and move to new aoUtil.glsl
Split shared shadow tap funcs into shadowUtil.glsl
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl index d97bd936d9..36854b0e66 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl @@ -122,19 +122,7 @@ vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod) return ret; } - -vec4 getPosition(vec2 pos_screen) -{ - float depth = texture2DRect(depthMap, pos_screen.xy).r; - vec2 sc = pos_screen.xy*2.0; - sc /= screen_res; - 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() { |