thatcosmonaut / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
3 stars 3 forks source link

Sampling from depth textures #232

Open TheSpydog opened 1 month ago

TheSpydog commented 1 month ago

The ability to sample from depth textures (which internally are reinterpreted through a color view) is very useful in certain situations. It was supported in Refresh v1.0, so we should revive the vestigial remnants and fully add support for this, in addition to an SDL_gpu_examples sample showcasing how it works!

Akaricchi commented 1 month ago

Got enough of Taisei ported today to confirm that depth sampling still works fine on Vulkan, using the DEPTH_16 format. Haven't tested the other backends yet.

thatcosmonaut commented 1 month ago

Would be nice to add a shadow mapping example or something like that but I'm pretty sure this feature just works already.