diff options
author | Jonathan "Geenz" Goodman <geenz@lindenlab.com> | 2024-11-25 20:56:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-25 20:56:03 -0500 |
commit | d65fb7cec8ce36ce7f6ff082f8d04bdd8bc0208c (patch) | |
tree | 0005e8ec095fb31dcd4f8b079af585e3333c365f /indra/newview/app_settings/shaders/class3/deferred/materialF.glsl | |
parent | 7ef6e8fce763eb529ed160ea4ff11e6125e32ed5 (diff) |
Drop emissive on old Intel GPUs (#3110)
* #3103 Add the ability to disable the emissive buffer for older GPUs with low memory bandwidth.
* #3135 Add a "vintage" mode for slower GPUs
* #2719 Fix for skies being overbrightened
* #2632 Do not apply tonemapping on legacy skies
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred/materialF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/materialF.glsl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl index 3c13144299..e62f401817 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl @@ -51,7 +51,7 @@ uniform mat3 normal_matrix; in vec3 vary_position; void mirrorClip(vec3 pos); -vec4 encodeNormal(vec3 norm, float gbuffer_flag); +vec4 encodeNormal(vec3 n, float env, float gbuffer_flag); #if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND) @@ -415,8 +415,11 @@ 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] = encodeNormal(norm, flag); // XY = Normal. Z = Env. intensity. W = 1 skip atmos (mask off fog) - frag_data[3] = vec4(env, 0, 0, 0); + frag_data[2] = encodeNormal(norm, env, flag); // XY = Normal. Z = Env. intensity. W = 1 skip atmos (mask off fog) + +#if defined(HAS_EMISSIVE) + frag_data[3] = vec4(0, 0, 0, 0); +#endif #endif } |