Skip to content

Commit cba1807

Browse files
authored
#3326 Skip ambient probe sampling when we're in classic mode. Ensure that our passed in ambient lighting is the only thing that gets applied. (#3327)
1 parent a275157 commit cba1807

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ uniform float max_probe_lod;
3838

3939
uniform bool transparent_surface;
4040

41+
uniform int classic_mode;
42+
4143
#define MAX_REFMAP_COUNT 256 // must match LL_MAX_REFLECTION_PROBE_COUNT
4244

4345
layout (std140) uniform ReflectionProbes
@@ -739,7 +741,10 @@ void doProbeSample(inout vec3 ambenv, inout vec3 glossenv,
739741

740742
vec3 refnormpersp = reflect(pos.xyz, norm.xyz);
741743

742-
ambenv = sampleProbeAmbient(pos, norm, amblit);
744+
ambenv = amblit;
745+
746+
if (classic_mode == 0)
747+
ambenv = sampleProbeAmbient(pos, norm, amblit);
743748

744749
float lod = (1.0-glossiness)*reflection_lods;
745750
glossenv = sampleProbes(pos, normalize(refnormpersp), lod);
@@ -845,7 +850,10 @@ void sampleReflectionProbesLegacy(inout vec3 ambenv, inout vec3 glossenv, inout
845850

846851
vec3 refnormpersp = reflect(pos.xyz, norm.xyz);
847852

848-
ambenv = sampleProbeAmbient(pos, norm, amblit);
853+
ambenv = amblit;
854+
855+
if (classic_mode == 0)
856+
ambenv = sampleProbeAmbient(pos, norm, amblit);
849857

850858
if (glossiness > 0.0)
851859
{

0 commit comments

Comments
 (0)