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:
parent
b28e1505c5
commit
b1686a8f6a
|
@ -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\
|
||||
|
|
Loading…
Reference in New Issue