summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2023-09-06 10:31:03 -0500
committerRunitaiLinden <davep@lindenlab.com>2023-09-06 10:31:03 -0500
commit43cd4e84bc01abcf2820b9557abe761fbf5e8432 (patch)
tree1306bd620a37f951611a8c36837788e267065ec8 /indra/newview/app_settings/shaders/class3/deferred/materialF.glsl
parent75a0719ff59118c0a5c6713e952cab4d0640a7d5 (diff)
SL-19842 WIP -- Change how probe ambiance mixes with sky ambient.
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred/materialF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/materialF.glsl7
1 files changed, 3 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl
index 82e2de0c0f..319f2f25b7 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl
@@ -60,7 +60,7 @@ float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen);
#endif
void sampleReflectionProbesLegacy(inout vec3 ambenv, inout vec3 glossenv, inout vec3 legacyenv,
- vec2 tc, vec3 pos, vec3 norm, float glossiness, float envIntensity, bool transparent);
+ vec2 tc, vec3 pos, vec3 norm, float glossiness, float envIntensity, bool transparent, vec3 amblit_linear);
void applyGlossEnv(inout vec3 color, vec3 glossenv, vec4 spec, vec3 pos, vec3 norm);
void applyLegacyEnv(inout vec3 color, vec3 legacyenv, vec4 spec, vec3 pos, vec3 norm, float envIntensity);
@@ -339,10 +339,9 @@ void main()
vec3 ambenv;
vec3 glossenv;
vec3 legacyenv;
- sampleReflectionProbesLegacy(ambenv, glossenv, legacyenv, pos.xy*0.5+0.5, pos.xyz, norm.xyz, glossiness, env, true);
+ sampleReflectionProbesLegacy(ambenv, glossenv, legacyenv, pos.xy*0.5+0.5, pos.xyz, norm.xyz, glossiness, env, true, amblit_linear);
- // use sky settings ambient or irradiance map sample, whichever is brighter
- color = max(amblit_linear, ambenv);
+ color = ambenv;
float da = clamp(dot(norm.xyz, light_dir.xyz), 0.0, 1.0);
vec3 sun_contrib = min(da, shadow) * sunlit_linear;