Shader based screen effects for OpenGL #231

Open
alufolie91 wants to merge 10 commits from shadercrap into Saturn-Next
pull from: shadercrap
Member

good enough to merge tbh
this adds shader based versions of the Underwater, Heatwave and VHS screen effects, when shaders are enabled ingame
Those are quite a bit faster (esp the vhs effect!) due to not needing a gazillion drawcalls anymore and also dont have weird scaling behavior like the others, iirc they look effectively the same at any resolution and aspect ratio
One thing of note, unlike the old fixed function versions, those do not zoom into the image (which was somewhat distracting lul) caveat is just that they now suffer from very minor "stretching" at the borders (so does softwares underwater effect aswell btw)
Underwater has been tweaked to more closely match software at default res (1280x800), heatwave is still a modified underwater wave effect but readjusted
The VHS effect has been completely tuned to basically look identical to software at default res (it now finally does things like reading pixels from the opposite screen site like software does)
In the future this should make splitscreen compat easier to implement but not feeling like it atm, also planned is to try and port softwares heatshifter effect to glsl aswell at some point

good enough to merge tbh this adds shader based versions of the Underwater, Heatwave and VHS screen effects, when shaders are enabled ingame Those are quite a bit faster (esp the vhs effect!) due to not needing a gazillion drawcalls anymore and also dont have weird scaling behavior like the others, iirc they look effectively the same at any resolution and aspect ratio One thing of note, unlike the old fixed function versions, those do not zoom into the image (which was somewhat distracting lul) caveat is just that they now suffer from very minor "stretching" at the borders (so does softwares underwater effect aswell btw) Underwater has been tweaked to more closely match software at default res (1280x800), heatwave is still a modified underwater wave effect but readjusted The VHS effect has been completely tuned to basically look identical to software at default res (it now finally does things like reading pixels from the opposite screen site like software does) In the future this should make splitscreen compat easier to implement but not feeling like it atm, also planned is to try and port softwares heatshifter effect to glsl aswell at some point
alufolie91 added 10 commits 2026-11-26 16:12:08 +01:00
basically ported over from RR
water was massively toned down and adjusted, it visually almost matches software at default res (note that the software effects are not properly scaled lol)
the heat effect is just the water effect adjusted to look like the fixed function version from before but slightly slower to accomidate the slower water effect here

this should speed things up a little since we now only need ONE draw call instead of 20 per effect
small note: this does not zoom into the image like the shaderless version, which was quite jarring tbh but there can be some very slight "stretch" marks at screen border, but theyre extremely unnoticable
this is a fuckton faster lol
the old one did a gazillion draw calls now we do two, one for the fuzzy and the 2nd for the bars as both are handled within a single shader
thanks to RRs heat effect being super similar to the vhs bars lul
forgor
this makes sure the shaders dont sample outside the screen region as the screen textures may not be exactly screen sized
matches software
matches software aswell!
thisll take the screen from the opposite site instead of "stretching" it
always forget modulo is a thing lul
also adjust the color since they were too dark compared to software
idk maths for shit so this is pieced together from shit i found on the interwebs
this matches software since it also does the trongle for this ugh
the rest was also retuned and basically matches software at default res almost 1:1
not sure why i didnt think of this lul
saves us another screen texture copy and draw
so shit is even faster
forgor abt this, fixes interp in replay hut lulul
the shader looks the same no matter the resolution, so we shouldnt scale this at all
thisll now treat rows for offsetting like its always default resolution (1280x800)
also readjusted the upwards bar since its actually the same size as the downwards bar lul
You are not authorized to merge this pull request.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin shadercrap:shadercrap
git checkout shadercrap
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: saturn/SRB2Kart-Saturn#231