summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/gltf/pbrmetallicroughnessF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/gltf/pbrmetallicroughnessF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/gltf/pbrmetallicroughnessF.glsl4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/gltf/pbrmetallicroughnessF.glsl b/indra/newview/app_settings/shaders/class1/gltf/pbrmetallicroughnessF.glsl
index ac4ff50552..1d8a92bac7 100644
--- a/indra/newview/app_settings/shaders/class1/gltf/pbrmetallicroughnessF.glsl
+++ b/indra/newview/app_settings/shaders/class1/gltf/pbrmetallicroughnessF.glsl
@@ -64,6 +64,8 @@ in vec2 base_color_uv;
in vec2 emissive_uv;
void mirrorClip(vec3 pos);
+vec4 encodeNormal(vec3 norm, float gbuffer_flag);
+
vec3 linear_to_srgb(vec3 c);
vec3 srgb_to_linear(vec3 c);
// ==================================
@@ -241,7 +243,7 @@ void main()
#else
frag_data[0] = max(vec4(basecolor.rgb, 0.0), vec4(0));
frag_data[1] = max(vec4(orm.rgb,0.0), vec4(0));
- frag_data[2] = vec4(norm, GBUFFER_FLAG_HAS_PBR);
+ frag_data[2] = encodeNormal(norm, GBUFFER_FLAG_HAS_PBR);
frag_data[3] = max(vec4(emissive,0), vec4(0));
#endif
#endif