You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Conflating the interpolation method into the rendering backend's name is rather unfortunate, sloppy, and ultimately, incorrect. We've been intending to decouple these years ago, but somehow, it never happened.
output should only specify the backend: opengl or texture.
The OpenGL backend is shader-based; you always have a shader active, even if you don't specify one with glshader. That's just how modern OpenGL works. The default shader is the none shader which uses bilinear interpolation.
If we really wanted to provide a nearest-neighbour OpenGL mode, we should introduce a new nearest shader, and possibly alias none to bilinear as well. Then you could do this:
[sdl]output = opengl
[render]# for bilinear:glshader = none
# orglshader = bilinear
# for nearest-neighbour:glshader = nearest
The texture backend we use as a fallback for systems that are not OpenGL-capable (I would think there are not many out there, but that's a different topic), it makes sense to add a texture_interpolation setting with the bilinear and nearest options. Note we already have a texture_renderer setting, so the name of this new setting would be consistent with that.
This is all a rather low-risk change and could go in before the move to SDL3.
The text was updated successfully, but these errors were encountered:
Conflating the interpolation method into the rendering backend's name is rather unfortunate, sloppy, and ultimately, incorrect. We've been intending to decouple these years ago, but somehow, it never happened.
Now we have these:
opengl
– OpenGL + bilinear interpolationopenglnb
– OpenGL + nearest-neighbour interpolationtexture
– SDL's abstract "texture" backend + bilinear interpolationtexturenb
– SDL's abstract "texture" backend + nearest-neighbour interpolationWhat I think we should do instead:
output
should only specify the backend:opengl
ortexture
.The OpenGL backend is shader-based; you always have a shader active, even if you don't specify one with
glshader
. That's just how modern OpenGL works. The default shader is thenone
shader which uses bilinear interpolation.If we really wanted to provide a nearest-neighbour OpenGL mode, we should introduce a new
nearest
shader, and possibly aliasnone
tobilinear
as well. Then you could do this:The texture backend we use as a fallback for systems that are not OpenGL-capable (I would think there are not many out there, but that's a different topic), it makes sense to add a
texture_interpolation
setting with thebilinear
andnearest
options. Note we already have atexture_renderer
setting, so the name of this new setting would be consistent with that.This is all a rather low-risk change and could go in before the move to SDL3.
The text was updated successfully, but these errors were encountered: