SDL 2 getting grant to work on shader support

Like a phoenix, it will always rise again.
Post Reply
User avatar
Sirocco
Site Admin
Posts: 806
Joined: Fri Feb 12, 2021 10:25 pm
Location: Outer Demoscenia
Contact:

SDL 2 getting grant to work on shader support

Post 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.
User avatar
carra
Posts: 163
Joined: Thu May 13, 2021 10:39 am

Re: SDL 2 getting grant to work on shader support

Post 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
User avatar
Sirocco
Site Admin
Posts: 806
Joined: Fri Feb 12, 2021 10:25 pm
Location: Outer Demoscenia
Contact:

Re: SDL 2 getting grant to work on shader support

Post 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 :P

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.
User avatar
carra
Posts: 163
Joined: Thu May 13, 2021 10:39 am

Re: SDL 2 getting grant to work on shader support

Post 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?
User avatar
Sirocco
Site Admin
Posts: 806
Joined: Fri Feb 12, 2021 10:25 pm
Location: Outer Demoscenia
Contact:

Re: SDL 2 getting grant to work on shader support

Post 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.
Post Reply