This brings a few benefits, aswell as making the code easier and more understandable
Improved colour accuracy (colours are more in line with the actual software renderer and alot less overblown)
Improved Brightness accuracy (the brightness on some maps was quite off in alot of cases)
Improved Perfomance (in some cases the newer code performed around 40fps better for me than the old one)
Fixed Gamma slider issues (the old one didnt properly apply changes from the gamma slider until the next map load)
Also ported over NearestPaletteColor, which is completly backwards compatible to NearestColor but can be supplied with any given palette instead of just pLocalPalette
OpenGLs own gamma correction was removed, due to being in huge conflict with this (however the gammastuff branch might resolve this, as this adds back seperate gamma for colors, that can even be applied in software renderer https://github.com/Indev450/SRB2Kart-Saturn/tree/gammastuff)
However, some things from the old code remains, primarily the shader handling and the postprocess step
This is due to the Shader code/handling in srb2 works alot differently than in Kart which would require substantial rework
The postprocess shader is still applied in the DrawScreenFinalTexture directly as opposed to being applied to its own seperate screen texture, which may lead to some brightness issues in some cases, as screen fades or transparent surfaces
(maybe someone can figure this out, ive commented out the related code in i_video.c)
This should be tested thoroughly, but from my testing everything seemed to work really well
This completely reworks the palette renderer to use parts from Hannu Hanhi´s amazing work on https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1516
This brings a few benefits, aswell as making the code easier and more understandable
However, some things from the old code remains, primarily the shader handling and the postprocess step This is due to the Shader code/handling in srb2 works alot differently than in Kart which would require substantial rework The postprocess shader is still applied in the DrawScreenFinalTexture directly as opposed to being applied to its own seperate screen texture, which may lead to some brightness issues in some cases, as screen fades or transparent surfaces (maybe someone can figure this out, ive commented out the related code in i_video.c)
This should be tested thoroughly, but from my testing everything seemed to work really well
New Code
Old Code
Software Renderer