libsdl-org / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
9.62k stars 1.78k forks source link

Single channel alpha formats #9847

Open slouken opened 4 months ago

slouken commented 4 months ago

It would be useful to have a pixel format for single channel alpha surfaces. These are useful in shaders and are a compact representation of alpha maps.

flibitijibibo commented 3 months ago

Running through SDL_Render issues tagged for 3.x, sorry if you get multiple e-mails for this...

We've implemented support for this in our GPU API proposal at #9312, so it should be straightforward to expose to SDL_Render, if this needs to be used beyond SDL_Surface.