Opengl ES, issue while rendering close by objects

六眼飞鱼酱① 提交于 2019-12-22 11:27:02

问题


I am working with opengl es on android. I have a 3d humanoid model on which i can put a hairstyle which is another 3d model. While rendering i could find that on the area where the two objects are very close/coincides (the head-hair region) the rendering is not proper, in fact i get different results on different mobile devices. I doubt it is z-fighting. Are there some solution for rendering close by objects properly with opengl es which will be consistent across all mobile devices. I have attached a snapshot for reference.

Here i have a face model on which i have placed a hair model but instead of showing the hair on top of the head, i get this kind of rendering.


回答1:


Have you tried changing the float precision in the shader?

precision highp float; 

for example. I've noticed different results on different handsets as well, and bad results if highp was not enabled on some.

Scaling the scene can also solve the issue.



来源:https://stackoverflow.com/questions/36381785/opengl-es-issue-while-rendering-close-by-objects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!