From dba9521cf6e2b14a345f7e4a2554e536fb69feff Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 22 Oct 2018 19:23:10 +0100 Subject: 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. --- indra/newview/app_settings/shaders/class1/deferred/starsV.glsl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/app_settings/shaders/class1/deferred') 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; -- cgit v1.2.3