Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 9 of 9

Thread: Overlap Problems!!

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2013
    Posts
    4

    Overlap Problems!!

    I want to show Image.

    When using "glBlendFunc()", one image is well, but two or over have a problem.

    There are unprepared border-line Alpha value . (please see attachment file)

    This is key value. so overlap part must be white!!

    if you know solve this problem, or useful information. please help me.

  2. #2
    Junior Member Newbie
    Join Date
    Jan 2013
    Posts
    4
    I cant use urls.. so. please show this url.

    => cfile296.uf.daum.net/image/1521CD4150ED17DB0D91C3

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,104
    When rendering with blending to get the correct result the objects must be sorted from furtherest from the camera to the nearest. Then render the furtherest first. Are you doing this?

  4. #4
    Junior Member Newbie
    Join Date
    Jan 2013
    Posts
    4
    Actually, I just use sample.

    so I can't understand and I don't know what to do..

    So Please show me some example code...I beg you.

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,104

  6. #6
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,124
    Not sure why you can't use images. Try this:

    [img]http://cfile296.uf.daum.net/image/1521CD4150ED17DB0D91C3[/img]

    for instance, here it is (same bbcode):


  7. #7
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,124
    Your picture is somewhat low-res, but I'll wager a guess this black border is where you either have partial alpha values in your texture (i.e. 0 < alpha < 1 ) OR where the GPU is generating partial alpha values due to texture filtering during sampling.

    If you don't want the latter, disable linear interpolation by setting the MIN and MAG filters to NEAREST/NEAREST_MIPMAP_NEAREST (or just NEAREST for the latter if you don't have MIPmaps in your texture).

    Let's see your blend function and what color and alpha values (including the color values for translucent/transparent texels) are being stored in your texture across a transition from "outside" the feature to "inside". Also, are you using a compressed texture internal format? And (since it sounds like you're doing chroma-key), are you modifying the texture to make the key values transparent? If so, you might be missing the texels with partial alpha. Premultiplied alpha is probably what you want, but let's see your data first.
    Last edited by Dark Photon; 01-09-2013 at 06:35 AM.

  8. #8
    Junior Member Newbie
    Join Date
    Jan 2013
    Posts
    4
    Thank you for comment. But I can't solve problem..

    I try set MIN and MAG to solve problems. but can't.

    Change all parameters that

    Parameters(MIN)
    GL_NEAREST (MAG Only)
    GL_LINEAR (MAG Only)
    GL_NEAREST_MIPMAP_NEAREST
    GL_NEAREST_MIPMAP_LINEAR
    GL_LINEAR_MIPMAP_NEAREST
    GL_LINEAR_MIPMAP_LINEAR

    So, Have you anything idea to solve this problem?

  9. #9
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,124
    You didn't answer most of my questions.

Posting Permissions

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