diff options
author | Dave Parks <davep@lindenlab.com> | 2024-11-12 17:26:38 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-12 15:26:38 -0800 |
commit | 2b255535efbce4634cdd2c671f597774e1783372 (patch) | |
tree | 24be217e4002dcb9ee7d78df4d305a4740038a68 /indra/newview/app_settings/shaders/class3 | |
parent | 13c0708cc70078e5118dd88de57d4ffd52f85024 (diff) |
2590 mac intel and radeon pro 5300m horrible fps 2 (#3030)
* OpenGL 3.3 compatibility pass. Fix for FBO driven downscaling corrupting textures.
* Increase maximum texture bias, immediately scale down when textures are loaded higher resolution than desired
* #2590 Fix for some frame stalls on Intel Macs
Diffstat (limited to 'indra/newview/app_settings/shaders/class3')
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/materialF.glsl | 3 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl index 26ab0406f6..3c13144299 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl @@ -51,6 +51,7 @@ uniform mat3 normal_matrix; in vec3 vary_position; void mirrorClip(vec3 pos); +vec4 encodeNormal(vec3 norm, float gbuffer_flag); #if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND) @@ -414,7 +415,7 @@ void main() frag_data[0] = max(vec4(diffcol.rgb, emissive), vec4(0)); // gbuffer is sRGB for legacy materials frag_data[1] = max(vec4(spec.rgb, glossiness), vec4(0)); // XYZ = Specular color. W = Specular exponent. - frag_data[2] = vec4(norm, flag); // XY = Normal. Z = Env. intensity. W = 1 skip atmos (mask off fog) + frag_data[2] = encodeNormal(norm, flag); // XY = Normal. Z = Env. intensity. W = 1 skip atmos (mask off fog) frag_data[3] = vec4(env, 0, 0, 0); #endif diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl index ca88fe7482..a9b299cfd7 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl @@ -27,6 +27,8 @@ out vec4 frag_color; +vec4 decodeNormal(vec4 norm); + uniform sampler2D diffuseRect; uniform sampler2D specularRect; uniform sampler2D emissiveRect; // PBR linear packed Occlusion, Roughness, Metal. See: pbropaqueF.glsl |