3 ms·
Also, while looking at your Which Way Round, I notice you're using cascade shadow maps with 4 cascades, which seems a bit overkill considering I can only spot 2
by Jasper_ 3y ago
Also, while looking at your Which Way Round, I notice you're using cascade shadow maps with 4 cascades, which seems a bit overkill considering I can only spot 2 cascades on the page. It seems you're also rendering depth to an RGBA8 map? I'm a bit confused why, because WebGL definitely supports depth maps and comparison samplers. You should get a free PCF by using a linear comparison sampler, which will make your texture filtering look a bit linear.
- fidotron 3y agoCompatibility. Those features do not work on different mobile devices (depth maps on iOS for example). On top of that things like some Malis will return different levels of precision from what you ask for. The whole area of image and depth format support is a nightmare. You rightly point out that this causes the shadow maps to be the bane of my existence. Consequently my biggest hope for WebGPU is to be able to get rid of many of these device level inconsistencies and do things like reverse the z-buffer. Edit to add: the configuration of cascades is not optimal in the context of these games but I am using these as tests for potential future things which would need that number of cascades. At some point I decided I had to stop playing with shadow buffers and just release something!
- Jasper_ 3y agoEver since Apple rewrote their WebGL backend in Safari (and even a bit before then), it's been fine. I even do a 5-tap PCF which works just fine on iOS for me.