x3dom / x3dom

X3DOM. A framework for integrating and manipulating X3D scenes as HTML5/DOM elements.
http://x3dom.org
Other
812 stars 271 forks source link

fog w shadows & ssao #1312

Closed dmorehead closed 8 months ago

dmorehead commented 8 months ago

simplified "fog + shadows" to no longer have to use a custom GL_BLEND or use gl.drawArrays twice within the shadow pass. Instead use fog to "mask" the shadows so only the "shadows - fog" are returned from renderShadows. Also applied this same logic to the SSAO pass as it feels more natural visually to have the SSAO disappear into the fog.

fogShadSSAO
andreasplesch commented 8 months ago

Thanks ! I think this could work well as simplifications are always welcome. Please run npm run lint-fix which should take care of the formatting. There may also be some comments on the code.