Open tresabhi opened 8 months ago
Weird, yes the first part of your question is a bug. CSM to prove https://codesandbox.io/s/awesome-robinson-dz3p99?file=/src/App.tsx
Heck, even commenting "// csm_FragColor" anywhere breaks the code.
Not sure what you mean. Comments are stripped internally, so they shoudlnt have any effect. Here is a CSB with it working as expected with a // csm_FragColor
https://codesandbox.io/s/sad-booth-ttjwg8?file=/src/App.tsx
Temporary workaround is to use shader replacement like so: https://codesandbox.io/s/nervous-agnesi-mz8yzj?file=/src/App.tsx:897-926
Doing this does not seem to have any performance implications. However, the bug should be fixed in the next update.
Weird, comments did break them in my case, oh well. Glad to see such a rapid fix 😄, thanks!
When in opaque mode, my shader uses diffuse color to allow there to be lighting on the mesh. When not in opaque mode, my shader forms a neon overlay. But using both, even in an exclusive if/else statement, doesn't work. Heck, even commenting "// csm_FragColor" anywhere breaks the code.