Skip to content

Commit bdf0d02

Browse files
note down important observation.
1 parent 65a810f commit bdf0d02

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples_tests/42.FragmentShaderPathTracer/litBySphere.frag

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,12 @@ void closestHitProgram(in ImmutableRay_t _immutable, inout irr_glsl_xoroshiro64s
177177
const vec3 throughputCIE_Y = transpose(irr_glsl_sRGBtoXYZ)[1]*throughput;
178178
const float monochromeEta = dot(throughputCIE_Y,BSDFNode_getEta(bsdf)[0])/(throughputCIE_Y.r+throughputCIE_Y.g+throughputCIE_Y.b);
179179
if (doNEE)
180+
{
181+
// if we allowed non-watertight transmitters (single water surface), it would make sense just to apply this line.
180182
validPath = irr_glsl_calcAnisotropicMicrofacetCache(_cache,interaction,_sample,monochromeEta);
183+
// but we don't allow non watertight transmitters in this renderer
184+
validPath = validPath && _sample.NdotL>0.0;
185+
}
181186
else
182187
{
183188
maxT = FLT_MAX;

0 commit comments

Comments
 (0)