Results 1 to 5 of 5

Thread: Black Artifacts

  1. #1

    Black Artifacts

    Hi,

    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:



    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.

  2. #2
    Member
    Join Date
    Jun 2012
    Location
    Texas
    Posts
    61

    Re: Black Artifacts

    Are you sure all of your triangles strips are wound in the same direction?

    Maybe LG's OpenGL ES driver does not use the same defaults for backface culling as other drivers. Try experimenting with changing these options:

    glEnable(GL_CULL_FACE);
    glCullFace(GL_BACK);
    glCullFace(GL_FRONT);

    Regards, Clay

  3. #3

    Re: Black Artifacts

    Thanks for the tip. I tried every permutation:

    GL_CW & GL_BACK
    GL_CW & GL_FRONT
    GL_CCW & GL_BACK
    GL_CCW & GL_FRONT

    And even disabled culling altogether. Unfortunately, the artifacts still show up.

    If it helps, the severity of the artifacting increases as the model get closer to the camera.

    Also, the shader being applied to the gun does not have any lighting information -- it's a simple texture map. Here's the fragment shader:

    Code :
    uniform sampler2D diffuseMap;
     
    varying vec4 varyColor;
    varying vec2 varyTex0;
     
    void main()
    {
        gl_FragColor = texture2D( diffuseMap, varyTex0.xy );
    }

    Thanks again.
    --
    Brennan

  4. #4

    Re: Black Artifacts

    Quick update -- I changed my shader to output the tex coordinates as the R & G channels in my fragment shader. I just set B & A to 0 and 1, respectively. Everything renders correctly (i.e. no artifacts). So, it looks like something is up with my texture settings. If I had to guess, it might be the min/max filters, since the artifacts seems to be a function of distance from the camera.

  5. #5
    Member
    Join Date
    Jun 2012
    Location
    Texas
    Posts
    61

    Re: Black Artifacts

    Do any of the minimization filter types work correctly? Do you have proper mipmaps? Use the PowerVR TextoolGui to be sure.

    Regards, Clay

Similar Threads

  1. raytracer and openCL artifacts
    By abahena in forum OpenCL
    Replies: 1
    Last Post: 05-06-2010, 12:48 PM
  2. Create an OpenGL ES black list ...
    By yannoo in forum Suggestions for future OpenGL ES releases
    Replies: 1
    Last Post: 04-27-2004, 08:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •