Fix empty image wire drawing with front/back depth

The vertex shaders depth offset was ignored in this case.
This commit is contained in:
Campbell Barton 2019-09-03 19:13:25 +10:00
parent 65db18fc56
commit 9be138bf63
1 changed files with 6 additions and 0 deletions

View File

@ -37,9 +37,15 @@ void main()
if (depthMode == DEPTH_BACK) {
gl_FragDepth = 0.999999;
#ifdef USE_WIRE
gl_FragDepth -= 1e-5;
#endif
}
else if (depthMode == DEPTH_FRONT) {
gl_FragDepth = 0.000001;
#ifdef USE_WIRE
gl_FragDepth -= 1e-5;
#endif
}
else if (depthMode == DEPTH_UNCHANGED) {
gl_FragDepth = gl_FragCoord.z;