summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-10-22 19:23:10 +0100
committerGraham Linden <graham@lindenlab.com>2018-10-22 19:23:10 +0100
commitdba9521cf6e2b14a345f7e4a2554e536fb69feff (patch)
tree31e0705b6c752f8eeadb6b4c56b7dab12710008e /indra/newview/app_settings/shaders/class1/deferred
parent91615351b56cbf36ef26fdd05fb3212414a2d679 (diff)
SL-9806
Get dome rendering to not assert the depth test state behind deferred render's back. Make clouds write and test depth to give stars something to depth test against. Add z-bias in star vert shader to force some depth testing of stars against clouds.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/starsV.glsl8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/starsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/starsV.glsl
index e14d02a4a9..bb2a2ee72b 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/starsV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/starsV.glsl
@@ -38,7 +38,13 @@ VARYING vec2 screenpos;
void main()
{
//transform vertex
- gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vec4 pos = modelview_projection_matrix * vec4(position, 1.0);
+
+// bias z to fix SL-9806 and get stars to depth test against clouds
+ pos.z += 0.001f;
+
+ gl_Position = pos;
+
float t = mod(time, 1.25f);
screenpos = position.xy * vec2(t, t);
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;