From b2d8d63890e3ba0a5fe303f8e2de7358e4f9fc23 Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Fri, 9 Mar 2018 20:59:18 +0000 Subject: Fix warnings from shaders and include EXTRA_CODE_HERE sentinel in places using DEFINE_GL_FRAGCOLOR for consistency. --- indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl') diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl index 662c762bca..86625a25ae 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl @@ -23,6 +23,8 @@ * $/LicenseInfo$ */ +/*[EXTRA_CODE_HERE]*/ + #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_data[3]; #else -- cgit v1.2.3 From 98b2fed85fd459012ed2b859ea40a3f56d27c0e8 Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Mon, 12 Mar 2018 17:52:04 +0100 Subject: De-duplicate shader code for encoding and decoding normals to/from gbuffer format. --- indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl') diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl index 86625a25ae..60d83cc623 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl @@ -38,11 +38,7 @@ uniform float minimum_alpha; VARYING vec3 vary_normal; 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() { -- cgit v1.2.3