Fix depth buffer texture (for soft particle shader effects)

thanks to
https://community.khronos.org/t/cannot-read-from-depth-buffer-in-fs/76169/8

apparently the default doom3 texture filter was something using mipmaps,
which doesn't work so well for textures without mipmaps..
no idea why those two lines in idImage::CopyDepthbuffer() were commented
out, but they're needed (and also un-commented in TDM, I just missed
that when merging -_-)
This commit is contained in:
Daniel Gibson 2024-06-15 02:38:31 +02:00
parent 23627380dd
commit 6a3fa8c28a

View file

@ -1928,8 +1928,8 @@ void idImage::CopyDepthbuffer( int x, int y, int imageWidth, int imageHeight, bo
qglCopyTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, x, y, imageWidth, imageHeight );
}
// qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
// qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );