diff options
author | Graham Linden <graham@lindenlab.com> | 2018-10-22 19:23:10 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-10-22 19:23:10 +0100 |
commit | dba9521cf6e2b14a345f7e4a2554e536fb69feff (patch) | |
tree | 31e0705b6c752f8eeadb6b4c56b7dab12710008e /indra/newview/app_settings | |
parent | 91615351b56cbf36ef26fdd05fb3212414a2d679 (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')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/starsV.glsl | 8 |
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; |