GLSL Shadertoy conversion troubleshoot: GLSL_PathTracer not showing expected colors

Dear community,

Whilest trying to port the shadertoy port to TouchDesigner for GLSL_PathTracer by knightcrawler25. ported to shadertoy by Asif Ali and markusm, I stumble across colors and refraction that seems off, mainly oversaturated blues and lack of transparency.

Could you advise on the appropriate troubleshooting for this finding, in order to correct for the expected colors in the output?

Shadertoy port still as reference:

TouchDesigner port of shadertoy port still:

Included with this topic as a file is the tox (
GLSL_PathTracer_0.1.tox (10.5 KB)
) holding the TD port with multi buffer setup mirroring the shadertoy port found here: Shader - Shadertoy BETA .

Dear @Derivative,

Could anyone of your team or anyone here in the community help to look in the right direction of solving the question how windows os (nvidia quadro a4000 graphics card) TouchDesigner glsl port linked above returns a lot of glitches and unexpected color behavior, while the exact same code on mac os returns completely accurate?

Could it have to do with the graphics card interaction in TouchDesigner?

Looking forward to your response.

Hi @Hototo,

we are having a look.

cheers
Markus

Hey,
Usually when we see different behavior between different GPUs/OSs, it’s due to uninitialized variables. I notice there are many uninitialized variables in the state variable in PathTrace().
If I set these member to something, the results become a bit more sane, although still not correct.
There is most likely other bugs in the shader still that are only showing up in some cases.
The heavy noise I see in buffer_A, and the visual blocking structure of some of that noise, leads me to believe the are still uninitialized values/divide by 0 errors occurring in that code.