diff options
author | Dave Parks <davep@lindenlab.com> | 2023-02-03 17:18:39 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2023-02-03 17:18:39 -0600 |
commit | 830cb6b66551025285120fb628f0b5ebf3841756 (patch) | |
tree | 668e10bab4f075bca49f006017e7dfccfd8096ce /indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl | |
parent | 4259ea79535e88ef6d8ec8415c53c28d0c2d89ac (diff) |
SL-19148 Decruft some forward shaders and drawpools. Fix HUDs being in wrong color space.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl | 78 |
1 files changed, 3 insertions, 75 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl index f693323d45..850f7ebb38 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl @@ -22,85 +22,13 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ - -/*[EXTRA_CODE_HERE]*/ -#ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif - -#ifndef HAS_DIFFUSE_LOOKUP -uniform sampler2D diffuseMap; -#endif - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; -VARYING vec3 vary_texcoord1; -VARYING vec3 vary_position; - -uniform samplerCube environmentMap; +//debug stub -// render_hud_attachments() -> HUD objects set LLShaderMgr::NO_ATMO; used in LLDrawPoolAlpha::beginRenderPass() -uniform int no_atmo; - -vec3 fullbrightShinyAtmosTransport(vec3 light); -vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten); -vec3 fullbrightScaleSoftClip(vec3 light); - -void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten, bool use_ao); - -vec3 linear_to_srgb(vec3 c); -vec3 srgb_to_linear(vec3 c); +out vec4 frag_color; -// See: -// class1\deferred\fullbrightShinyF.glsl -// class1\lighting\lightFullbrightShinyF.glsl void main() { -#ifdef HAS_DIFFUSE_LOOKUP - vec4 color = diffuseLookup(vary_texcoord0.xy); -#else - vec4 color = texture2D(diffuseMap, vary_texcoord0.xy); -#endif - - color.rgb *= vertex_color.rgb; - - // SL-9632 HUDs are affected by Atmosphere - if (no_atmo == 0) - { - vec3 sunlit; - vec3 amblit; - vec3 additive; - vec3 atten; - vec3 pos = vary_position.xyz; - - calcAtmosphericVars(pos.xyz, vec3(0), 1.0, sunlit, amblit, additive, atten, false); - - vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb; - float env_intensity = vertex_color.a; - - //color.rgb = srgb_to_linear(color.rgb); - color.rgb = mix(color.rgb, envColor.rgb, env_intensity); - color.rgb = fullbrightAtmosTransportFrag(color.rgb, additive, atten); - color.rgb = fullbrightScaleSoftClip(color.rgb); - } - -/* - // NOTE: HUD objects will be full bright. Uncomment if you want "some" environment lighting effecting these HUD objects. - else - { - vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb; - float env_intensity = vertex_color.a; - color.rgb = mix(color.rgb, envColor.rgb, env_intensity); - } -*/ - - color.a = 1.0; - - //color.rgb = linear_to_srgb(color.rgb); - - frag_color = color; + frag_color = vec4(0.25, 0.5, 0, 1.0); } |