Page 1 of 1
SDL 2 getting grant to work on shader support
Posted: Sat Nov 13, 2021 6:18 pm
by Sirocco
As Ray Gordon explains... SDL 2 will be getting shader support, without having to go full OpenGL. I've been using SDL 2 in mostly software mode, essentially drawing to a FBO and pushing that to the screen. I wasn't aware that shader support wasn't available from their normal software stack... although this does make sense as there's a purely software renderer, and that can't support shaders.
A few months ago I was thinking of working in a CRT shader to my current SDL 2 project. I guess that's still feasible so long as I apply the shader to the final frame
Anyone using SDL 2 outside of full-on OpenGL, and excited about this? I'm in the process of switching to Raylib completely, and I never really dug deep into SDL 2, so I can't really offer much beyond that.
Re: SDL 2 getting grant to work on shader support
Posted: Sat Nov 13, 2021 6:45 pm
by carra
That is indeed interesting. I do use SDL2+OpenGL for essentially all my gaming projects, but I don't currently use shaders (still use the old render pipeline). But I guess some people might find SDL based shaders interesting since they may work regardless of whether you use OpenGL/DirectX/whatever
Re: SDL 2 getting grant to work on shader support
Posted: Sun Nov 14, 2021 10:33 pm
by Sirocco
Raylib seems to have reasonably sane shader support (although I have nothing to compare it to, so I'm just guessing). I did some experimenting with shaders in SDL + OpenGL back in 2010 or so, and didn't really get too far. I wrote a fragment shader, then moved on with my life
Shaders are just a gigantic band-aid that I had always hoped to avoid. But I guess it's not worth ignoring at this point lol.
Re: SDL 2 getting grant to work on shader support
Posted: Mon Nov 15, 2021 10:16 am
by carra
+1 to the band-aid haha. The thing that bothers me is that the way even seemingly unrelated tasks have to be done via shaders. Do you actually use shaders in your games nowadays?
Re: SDL 2 getting grant to work on shader support
Posted: Wed Nov 17, 2021 12:18 am
by Sirocco
carra wrote: ↑Mon Nov 15, 2021 10:16 am
+1 to the band-aid haha. The thing that bothers me is that the way even seemingly unrelated tasks have to be done via shaders. Do you actually use shaders in your games nowadays?
I guess that depends on how your drawing pipeline is set up, and the volume of effects you need. If you're doing a ton of post-processing, or working with textures on a GPU, shaders can quickly end up being a necessity. If you're still doing software rendering, you can probably get away without using them.