当前位置:网站首页>Unity solves Z-fighting

Unity solves Z-fighting

2022-04-23 20:34:00 One Mr rabbit one

The cause of the problem :

3d When in the game 2 A slice is close to the cutting plane w When falling in the same interval , Their depth is equal , The screen will flash in the game ;

terms of settlement :

The solution given on the Internet is generally to set the depth offset ;
Because the hardware can only support a certain depth format , in other words ,Depth bits It must be , False as D. The projection depth of the vertex is unlimited , He can be near_clip —> far_clip Any floating point number . therefore

dw/D = (far_clip – near_clip)/near_clip;

stay unity The specific modification method is to find the corresponding camera in the scene , Set up Clipping Planes Of Near The larger the scope allowed by the scene, the better .

The solution given by Microsoft is to modify far_clip, The method is the same Microsoft link

 Insert picture description here

版权声明
本文为[One Mr rabbit one]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210548406602.html