erichlof / THREE.js-PathTracing-Renderer

Real-time PathTracing with global illumination and progressive rendering, all on top of the Three.js WebGL framework. Click here for Live Demo: https://erichlof.github.io/THREE.js-PathTracing-Renderer/Geometry_Showcase.html
Creative Commons Zero v1.0 Universal
1.94k stars 177 forks source link

Glitches in Constructive_Solid_Geometry_Viewer #54

Closed mrdoob closed 1 year ago

mrdoob commented 3 years ago

https://erichlof.github.io/THREE.js-PathTracing-Renderer/Constructive_Solid_Geometry_Viewer.html

I remember these glitches being due to uninitialized variables.

Union:

Screen Shot 2021-03-10 at 10 36 25 AM

Difference:

Screen Shot 2021-03-10 at 10 36 39 AM

Intersection:

Screen Shot 2021-03-10 at 10 36 53 AM

Loving the progress! 😊

jadsongmatos commented 3 years ago

this yields a beautiful glitch effect

erichlof commented 3 years ago

@mrdoob Hello! Thank you for the heads-up about this glitching issue. If you don't mind, what system/GPU were the screenshots taken from? I can't reproduce on my Toshiba Windows laptop with Intel integrated graphics, or my Windows Surface Laptop with GeForce GPU , or my Samsung S9 smartphone.

In the meantime I'll take a look at my shader code for this demo and see if I forgot to initialize anything. Thanks again! -Erich

mrdoob commented 3 years ago

Chrome 89.0.4389.82 MacOS 10.15.7 MacBook Pro 2016 Intel Iris Graphics 550 1536 MB

erichlof commented 3 years ago

Ok thanks, unfortunately I don't have Apple devices like the MacBook that I can periodically test out my code on. At any rate, just now I went back and initialized some of the float variables in the CSG viewer fragment shader. Could you take another look and see if that helped at all? Thanks - sorry for testing by proxy! :)

mrdoob commented 3 years ago

Unfortunately, seems like the issue is still there...

Thanks - sorry for testing by proxy! :)

No worries!

erichlof commented 3 years ago

Ok thanks for checking. I'll see if I can get access to an Apple device so I can debug more systematically. Thanks again for the heads-up. -Erich