diff options
author | Graham Linden <graham@lindenlab.com> | 2018-08-23 00:53:11 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-08-23 00:53:11 +0100 |
commit | b86e899e7e51c56252479236df9a74f9bb432670 (patch) | |
tree | a3276191e36e0c77b17b28c7c9121874acf271f8 /indra/newview | |
parent | f45edabe478eb2e5ed899377f541875cbd566977 (diff) |
MAINT-9006
Make perspective projection consistent between ALM and non-ALM when drawing water (horizon matches).
Make perspective projection consistent between ALM and non-ALM when drawing heavenly bodies (sun disc position matches).
Make gamma correction of sun disc tex consistent between ALM and non-ALM rendering.
Diffstat (limited to 'indra/newview')
5 files changed, 13 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunDiscV.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunDiscV.glsl index c75440cd05..5b4302e237 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/sunDiscV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/sunDiscV.glsl @@ -38,10 +38,11 @@ void main() { //transform vertex vec4 vert = vec4(position.xyz, 1.0); - vec4 pos = (modelview_matrix * vert); + vec4 pos = modelview_projection_matrix*vert; - gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); + gl_Position = pos; calcAtmospherics(pos.xyz); + vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; } diff --git a/indra/newview/app_settings/shaders/class1/windlight/sunDiscF.glsl b/indra/newview/app_settings/shaders/class1/windlight/sunDiscF.glsl index 0eb32b69b8..05251e7e96 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/sunDiscF.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/sunDiscF.glsl @@ -46,7 +46,7 @@ void main() vec4 sunA = texture2D(diffuseMap, vary_texcoord0.xy); vec4 sunB = texture2D(altDiffuseMap, vary_texcoord0.xy); vec4 c = mix(sunB, sunA, blend_factor); - c.rgb = pow(c.rgb, vec3(0.45f)); + c.rgb = pow(c.rgb, vec3(0.7f)); c.rgb = fullbrightAtmosTransport(c.rgb); c.rgb = fullbrightScaleSoftClip(c.rgb); frag_color = c; diff --git a/indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl b/indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl index 5a6e481b18..90acb5be9e 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl @@ -38,9 +38,9 @@ void main() { //transform vertex vec4 vert = vec4(position.xyz, 1.0); - vec4 pos = (modelview_matrix * vert); + vec4 pos = modelview_projection_matrix*vert; - gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); + gl_Position = pos; calcAtmospherics(pos.xyz); diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index ad4df751fd..913a85affd 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -724,7 +724,11 @@ void LLDrawPoolWater::shade() sNeedsDistortionUpdate = TRUE; face->renderIndexed(); } - else if (gGLManager.mHasDepthClamp || deferred_render) + // MAINT-9006 using squash clip even for deferred keeps + // horizon consistent between ALM and non-ALM rendering + // I can't think of a reason we'd want to avoid it. - g + //else if (gGLManager.mHasDepthClamp || deferred_render) + else if (gGLManager.mHasDepthClamp) { face->renderIndexed(); } diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index 3557f5a1ce..6b32c196dc 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -572,7 +572,8 @@ void LLDrawPoolWLSky::render(S32 pass) { gGL.pushMatrix(); - gGL.translatef(origin.mV[0], origin.mV[1], origin.mV[2]); + // MAINT-9006 keep sun position consistent between ALM and non-ALM rendering + //gGL.translatef(origin.mV[0], origin.mV[1], origin.mV[2]); // *NOTE: have to bind a texture here since register combiners blending in // renderStars() requires something to be bound and we might as well only |