Results 1 to 4 of 4

Thread: texturing with transparency

  1. #1
    Member Contributor
    Join Date
    May 2012
    Posts
    51

    texturing with transparency

    Whats the best way of texturing an a polygon whilst making certain sections of the textured polygon transparent.

    Are the only two ways possible using a texture with an alpha channel or loading your rectangle texture and then making certain colours transparent.

    Please can you recommend the fastest and easiest way

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Oct 2004
    Posts
    4,649

    Re: texturing with transparency

    The traditional way is to use a texture with an alpha channel.

    Is there some concern you have regarding that approach?

  3. #3
    Senior Member Regular Contributor Rosario Leonardi's Avatar
    Join Date
    Aug 2008
    Location
    Italy
    Posts
    356

    Re: texturing with transparency

    Using alpha channel you have no memory impact (the pixel are always stored aligned at 32 bit) the only overload is on the disk.
    Is faster and hardware usually make optimization, you can also use advanced technique like alpha to coverage. Alpha can vary from 0 to 255 making the transition smooth.

    Choosing one color to be transparent you have ma add instruction to your shader (slower) and can't make smooth transition.
    I don't see any advantage using this technique.
    ~ ~ I tell you, realtime 3D is made of blood, sweat and screams! ~ ~

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Oct 2004
    Posts
    4,649

    Re: texturing with transparency

    Quote Originally Posted by Rosario Leonardi
    Using alpha channel you have no memory impact (the pixel are always stored aligned at 32 bit)
    That depends on the texture formats you choose. You're probably just thinking about RGB8 vs. RGBA8.

Similar Threads

  1. NSOpenGLView visual transparency vs. mouse transparency
    By hidefromkgb in forum OpenGL: macOS
    Replies: 1
    Last Post: 05-12-2015, 01:05 PM
  2. Multi-Texturing and .... normal texturing?
    By Andy Gilbert in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 04-06-2010, 05:30 PM
  3. Texturing and Texturing (newbie)
    By Sudeepa in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 12-17-2008, 05:47 AM
  4. Texturing Problem With transparency unusual prob
    By Rohland in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-13-2003, 12:33 AM
  5. OpenGL window transparency and texture transparency
    By ramalhais in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 03-15-2002, 09:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean