#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)
parent
a27515748f
commit
cba1807a91
|
|
@ -38,6 +38,8 @@ uniform float max_probe_lod;
|
|||
|
||||
uniform bool transparent_surface;
|
||||
|
||||
uniform int classic_mode;
|
||||
|
||||
#define MAX_REFMAP_COUNT 256 // must match LL_MAX_REFLECTION_PROBE_COUNT
|
||||
|
||||
layout (std140) uniform ReflectionProbes
|
||||
|
|
@ -739,7 +741,10 @@ void doProbeSample(inout vec3 ambenv, inout vec3 glossenv,
|
|||
|
||||
vec3 refnormpersp = reflect(pos.xyz, norm.xyz);
|
||||
|
||||
ambenv = sampleProbeAmbient(pos, norm, amblit);
|
||||
ambenv = amblit;
|
||||
|
||||
if (classic_mode == 0)
|
||||
ambenv = sampleProbeAmbient(pos, norm, amblit);
|
||||
|
||||
float lod = (1.0-glossiness)*reflection_lods;
|
||||
glossenv = sampleProbes(pos, normalize(refnormpersp), lod);
|
||||
|
|
@ -845,7 +850,10 @@ void sampleReflectionProbesLegacy(inout vec3 ambenv, inout vec3 glossenv, inout
|
|||
|
||||
vec3 refnormpersp = reflect(pos.xyz, norm.xyz);
|
||||
|
||||
ambenv = sampleProbeAmbient(pos, norm, amblit);
|
||||
ambenv = amblit;
|
||||
|
||||
if (classic_mode == 0)
|
||||
ambenv = sampleProbeAmbient(pos, norm, amblit);
|
||||
|
||||
if (glossiness > 0.0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue