From 4d39d889976dcc3b7aa7098bc70ab7ebb881c0a8 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Geenz\" Goodman" Date: Wed, 24 Jan 2024 15:50:13 -0800 Subject: https://github.com/secondlife/viewer/issues/671 Wire up the RenderMirrors debug setting. --- .../app_settings/shaders/class3/deferred/softenLightF.glsl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl') diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl index f5541df227..79d9000482 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl @@ -34,11 +34,13 @@ uniform sampler2D emissiveRect; // PBR linear packed Occlusion, Roughness, Metal uniform samplerCubeArray heroProbes; +#if defined(HERO_PROBES) layout (std140) uniform HeroProbeData { vec4 heroPosition[1]; int heroProbeCount; }; +#endif const float M_PI = 3.14159265; @@ -196,15 +198,12 @@ void main() vec3 v = -normalize(pos.xyz); color = pbrBaseLight(diffuseColor, specularColor, metallic, v, norm.xyz, perceptualRoughness, light_dir, sunlit_linear, scol, radiance, irradiance, colorEmissive, ao, additive, atten); + #ifdef HERO_PROBES vec3 refnormpersp = reflect(pos.xyz, norm.xyz); if (GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_MIRROR)) color = textureLod(heroProbes, vec4(env_mat * refnormpersp, 0), (1.0 - gloss) * 11).xyz * specularColor; - - if (do_atmospherics) - { - color = atmosFragLightingLinear(color, additive, atten); - } + #endif } else if (!GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_ATMOS)) { @@ -263,7 +262,9 @@ void main() // add radiance map applyGlossEnv(color, glossenv, spec, pos.xyz, norm.xyz); + #ifdef HERO_PROBES color = textureLod(heroProbes, vec4(env_mat * refnormpersp, 0), (1.0 - spec.a) * 11).xyz * spec.rgb; + #endif } -- cgit v1.2.3