Pixelation and choppy edges
I quickly realised that I really dislike the look of OpenGL compared to Software mode. Because I’m working on a mod meant to emulate games from the Playstation 1 era, all the texture filtering and smoothing made the whole thing look ugly. Switching to software mode completely disables all filtering. You can see the difference here.
However, the performance of software mode is terrible. The game struggles to run even vanilla Half-Life maps, screen-tearing is very noticeable and there’s, for some reason, a noticeably further away near plane on view models which causes clipping. However, it turns out you can switch texture parameters in OpenGL mode to get something fairly close to software mode. The cvar is gl_texturemode, and here are the valid inputs:
“GL_NEAREST” – GL_NEAREST
“GL_LINEAR” – GL_LINEAR
“GL_NEAREST_MIPMAP_NEAREST” – GL_NEAREST_MIPMAP_NEAREST and GL_NEAREST
“GL_LINEAR_MIPMAP_NEAREST” – GL_LINEAR_MIPMAP_NEAREST and GL_LINEAR
“GL_NEAREST_MIPMAP_LINEAR” – GL_NEAREST_MIPMAP_LINEAR and GL_NEAREST
“GL_LINEAR_MIPMAP_LINEAR” – GL_LINEAR_MIPMAP_LINEAR and GL_LINEAR
I created a cheat console command to give monsters infinite health (and myself infinite ammo) so I could experiment with shooting monsters non-stop until I got the look I was happy with. The reason for this is because in my previous post about creating blood sprites, I realised it looked quite ugly ingame, even though it looks fine as a sprite. I settled for GL_NEAREST.
I then found another cvar that was further filtering the edges, called gl_spriteblend. Setting this to 0 further roughened the edges of the blood to get the result I wanted.
There are plenty of other parameters that could be tweaked to get that PS1 look. For example, affine texture mapping or integer-snapped vertices
For now I’m quite happy with the result, though I’m sure further tweaking will come later.