Closed robertoranon closed 6 months ago
Hi, sorry for taking so long, but I was quite busy. Here is a modification of this PR that removes the ability to trace lights from the traceScene
function, as well as other modifications:
traceScene
was returning a light hit
The "dimming" of the area where the light surface technically is is caused because hitting the light technically counts as one of the limited "bounces" that a path is allowed to traverse. So the paths that go around the light surface bounce around the scene 3 times while the paths that hit the light only bounce twice since the light absorbs one.
To that end - here's what I'm thinking:
traceScene
function since this is causing light surfaces to cast shadows and is causing them to "use" path bounce. If this is addressed then the dimming issue you reported should no longer be an issue.state.firstRay || state.transmissiveRay
we find the closest light marked as visible we intersect with if any and terminate so it's visible.It depends on how you want to handle it - but it might be easiest to handle points 1 and 2 first and then 3 can be done in separately.
Hopefully that all makes sense - let me know if you have any other questions or need more direction on the codebase!