mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 09:50:34 +00:00
fixed a bug in gl_FragDepth computation in raycaster
This commit is contained in:
parent
823fb3a0e6
commit
0cb4914ac9
@ -890,7 +890,7 @@ void enable_raycaster() {
|
||||
|
||||
#ifndef GLES_ONLY
|
||||
fmain +=
|
||||
" gl_FragDepth = (" + to_glsl(-vnear+vfar)+"+w*" + to_glsl(2*vnear*vfar)+"/z)/" + to_glsl(vnear-vfar)+";\n"
|
||||
" gl_FragDepth = (" + to_glsl(-vnear-vfar)+"+w*" + to_glsl(2*vnear*vfar)+"/z)/" + to_glsl(vnear-vfar)+";\n"
|
||||
" gl_FragDepth = (gl_FragDepth + 1.) / 2.;\n";
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user