Black Artifacts on Android in OpenGL ES 2

给你一囗甜甜゛ 提交于 2019-12-20 04:12:13

问题


I have an OpenGL ES 2 code base that runs on iOS, Android, and on PC via the PowerVR emulation libraries.

When I run this code on an LG Optimus G LGE971, I see black artifacts on my model:

http://imageshack.us/photo/my-images/594/renderartifacts.png/

My first reaction was that the near clipping plane might be the issue, but because these artifacts appear on only select devices, I do not believe that is the issue. Any other ideas on what might be causing this?

Also, this isn't captured well in the above image, but the artifacts are not static -- they move around as the model rotates, etc.


回答1:


I think maybe Lighting Calculation in shader code was wrong by mistake.

That looks like only using Ambient light without diffuse & specular.

also I want you to check whether you converted the texture from BGRA to RGBA.




回答2:


The issue has been fixed. I fixed the issue by using

glTexImage2D()

with NULL for the buffer when I set up my mipmap levels, and then using

glTexSubImage2D()

when uploading the texture data into each level.



来源:https://stackoverflow.com/questions/15011389/black-artifacts-on-android-in-opengl-es-2

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