summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-07-19 20:46:37 +0100
committerGraham Linden <graham@lindenlab.com>2018-07-19 20:46:37 +0100
commit5b874db7c0568373a4132f933894d2733bd08ee2 (patch)
tree054ccbd72cb0cd0a07fd393a292f97fd0c062de1 /indra/newview/app_settings/shaders/class1/deferred/moonF.glsl
parent1abea33b7012b6b00502620dab92cc39eacb1d50 (diff)
Modify deferred sun disc and moon shaders to write all deferrred gbuffer channels
and fix rendering issue from norm/spec channels during lighting.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/moonF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/moonF.glsl8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl b/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl
index 6562b86aaf..2bfc4f3d2f 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl
@@ -28,9 +28,9 @@
/*[EXTRA_CODE_HERE]*/
#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 frag_color;
+out vec4 frag_data[3];
#else
-#define frag_color gl_FragColor
+#define frag_data gl_FragData
#endif
vec3 fullbrightAtmosTransport(vec3 light);
@@ -59,6 +59,8 @@ void main()
// and shows true moon color at night
vec3 luma_weights = vec3(0.1, 0.3, 0.0);
float mix = 1.0f - dot(sunlight_color.rgb, luma_weights);
- frag_color = vec4(c.rgb, mix * c.a);
+ frag_data[0] = vec4(c.rgb, mix * c.a);
+ frag_data[1] = vec4(0.0);
+ frag_data[2] = vec4(0.0f);
}