-
Notifications
You must be signed in to change notification settings - Fork 41
Description
Hi, I've been trying out SDL3's new GPU API and it's been fun - these examples are very helpful also. However, there is one thing that confused me:
There are examples that deal with mipmaps, chiefly TexturedQuad and GenerateMipMaps, but neither of them showcase the most basic use case for mip maps - automatic LOD selection in a 3D scene via Sample().
The TexturedQuad example is in 2D, and while it sets up some example samplers that enable mipmaps and even anisotropic filtering, they pretty much go unused as far as I can tell - SDL_GenerateMipmapsForGPUTexture is never called either.
What I ultimately tripped over in my own code was the fact that you have to explicitly set SDL_GPUSamplerCreateInfo.max_lod since the default value of zero simply means to always use the lowest LOD. Since this field isn't touched by any example and the default value is somewhat unfortunate it took me some time to find this.
I think it would be nice if one of the examples would implement this properly so that there is more guidance for a common usage pattern.