webaverse / app

Web metaverse client
https://app.webaverse.com
MIT License
344 stars 207 forks source link

Sonic Boom bug in street scene #2905

Open tcm390 opened 2 years ago

tcm390 commented 2 years ago

In shadertoy.js if we enable 'SAMPLE_ALPHA_TO_COVERAGE' (context.enable(context.SAMPLE_ALPHA_TO_COVERAGE);) the render of sonic-boom would be wrong:

https://user-images.githubusercontent.com/60634884/165412886-01cc98ea-aa4e-400b-9db5-8eb7d3d0403f.mp4

This is the result if I comment out context.enable(context.SAMPLE_ALPHA_TO_COVERAGE); :

https://user-images.githubusercontent.com/60634884/165413011-b1387a1a-7073-4acd-9761-84989a8dfb5f.mp4

tcm390 commented 2 years ago

Is it okay to disable SAMPLE_ALPHA_TO_COVERAGE?

avaer commented 2 years ago

Is it okay to disable SAMPLE_ALPHA_TO_COVERAGE?

No, that would break a lot of shaders. I think perhaps the sonic boom should be updated to be compatible with alpha to coverage.

tcm390 commented 2 years ago

Got it. I would search more on it. Because it also affect the light of the other scene.(post processing?) If we switch from the street scene to the treehouse scene, the render is also wrong(very bright). I would search on how to make them compatible.

enable:

https://user-images.githubusercontent.com/60634884/165538591-fae0287e-8914-4f57-9db6-5a250230755a.mp4

disable:

https://user-images.githubusercontent.com/60634884/165538601-6c2268b3-cb39-49f3-919f-ec07efaba153.mp4