Black Artifacts on Android in OpenGL ES 2

前端 未结 2 621
傲寒
傲寒 2021-01-25 00:03

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 art

相关标签:
2条回答
  • 2021-01-25 00:31

    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.

    0 讨论(0)
  • 2021-01-25 00:40

    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.

    0 讨论(0)
提交回复
热议问题