SDL2 provides by default 3 blend modes: alpha blend, additive, and multiply.
However I need to render filled rectangles using the Linear Light blend mode.
Is this possible to implement using OpenGL, or as a combination of the 3 built-in blend modes, or should I convert all my SDL_Texture
s to SDL_Surface
s and modify the pixel values manually?
SDL 2.0.6 introduced the function SDL_ComposeCustomBlendMode allowing you to create a new blend mode for 2D rendering.
Here is the doc entry: https://wiki.libsdl.org/SDL_ComposeCustomBlendMode