diff options
author | Graham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com> | 2018-03-12 17:52:04 +0100 |
---|---|---|
committer | Graham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com> | 2018-03-12 17:52:04 +0100 |
commit | 98b2fed85fd459012ed2b859ea40a3f56d27c0e8 (patch) | |
tree | 74c478cf0c9526d382cbaae00c0bc6f13d5968b1 /indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl | |
parent | cf460b13bee894684d0ca1bcb5bbc9eb38df719c (diff) |
De-duplicate shader code for encoding and decoding normals to/from gbuffer format.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl index e4fff3e21a..b328ee9483 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl @@ -39,11 +39,7 @@ VARYING vec3 vary_normal; VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; -vec2 encode_normal(vec3 n) -{ - float f = sqrt(8 * n.z + 8); - return n.xy / f + 0.5; -} +vec2 encode_normal(vec3 n); void main() { |