Closed gkjohnson closed 5 months ago
Note that both gpu path traced examples in the three-mesh-bvh project still work. And swapping to the "OpenGL" backend from "default" (metal) does not fix the issue.
It seems that commenting out the "directLightContribution" function fixes the issue. All other FEATURE_MIS code blocks are still enabled.
// next event estimation
#if FEATURE_MIS
gl_FragColor.rgb += directLightContribution( - ray.direction, surf, state, hitPoint );
#endif
edit
And only commenting out this also fixes this.
While looking through #475 it occurred to me that there are a few things about the code that we could simplify that may help with the MacOS rendering issue:
in
function parameter modifier is used but many functions do not guarantee that the uniform is set. We should ensure all structs are initialized on creation andinout
is used if a function will not guarantee the struct is fully written to. Otherwise undefined values could be left in the structs (see this three-mesh-bvh issue)~cc @robertoranon