Do not allow inf z value in the vertex shader. Clamp w to a very small value.

Fixes ground triangles clipping in Soulcalibur intro sequence.
This commit is contained in:
Flyinghead 2018-07-24 16:55:48 +02:00
parent b28e1505c5
commit b1686a8f6a
1 changed files with 4 additions and 1 deletions

View File

@ -108,7 +108,10 @@ void main() \n\
vtx_offs=in_offs; \n\
vtx_uv=in_uv; \n\
vec4 vpos=in_pos; \n\
vpos.w=1.0/vpos.z; \n"
if (isinf(vpos.z)) \n\
vpos.w = 1.18e-38; \n\
else \n\
vpos.w = 1.0 / vpos.z; \n"
#ifndef GLES
"\
if (vpos.w < 0.0) { \n\