mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-29 07:32:25 +00:00
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:
parent
23627380dd
commit
6a3fa8c28a
1 changed files with 2 additions and 2 deletions
|
@ -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 );
|
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_MIN_FILTER, GL_NEAREST );
|
||||||
// qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_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_S, GL_CLAMP_TO_EDGE );
|
||||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
|
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
|
||||||
|
|
Loading…
Reference in a new issue