diff options
author | Rye Mutt <rye@alchemyviewer.org> | 2022-09-01 17:30:48 -0400 |
---|---|---|
committer | Rye Mutt <rye@alchemyviewer.org> | 2022-09-01 17:30:48 -0400 |
commit | ef98be881c3f13e7668f75cb0d302261053d9804 (patch) | |
tree | 2c3f43d746e852b4ee5064306252e427291edff9 /indra/newview/app_settings/shaders/class3 | |
parent | d2d257cfa99b685160e16ed93c163018e9fe3c50 (diff) |
Use an SRGB buffer for initial reflection map capture for proper linear sampling
Fix irradiance gen up vector to be properly normalized
Diffstat (limited to 'indra/newview/app_settings/shaders/class3')
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl index 85bb9fbbd1..e6017534ca 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl @@ -335,7 +335,6 @@ void main() #if PBR_USE_IRRADIANCE_HACK irradiance = max(amblit,irradiance) * ambocc; #endif - specLight = srgb_to_linear(specLight); #if DEBUG_PBR_SPECLIGHT051 specLight = vec3(0,0.5,1.0); irradiance = specLight; @@ -670,6 +669,9 @@ else diffuse.rgb = linear_to_srgb(diffuse.rgb); // SL-14035 sampleReflectionProbes(ambenv, glossenv, legacyenv, pos.xyz, norm.xyz, spec.a, envIntensity); + ambenv.rgb = linear_to_srgb(ambenv.rgb); + glossenv.rgb = linear_to_srgb(glossenv.rgb); + legacyenv.rgb = linear_to_srgb(legacyenv.rgb); amblit = max(ambenv, amblit); color.rgb = amblit*ambocc; |