Results 1 to 4 of 4

Thread: blend one color in a texture

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2002
    Location
    Valencia
    Posts
    6

    blend one color in a texture

    How can I make one color of a texture not be visible?.
    Tnx.

    Liso.
    Linux has you...
    --
    Liso -Eadem Mutata Resurgo-
    Linux has you...

  2. #2
    Member Contributor
    Join Date
    Jan 2001
    Posts
    60

    Re: blend one color in a texture

    First you have to load the texture as RGBA and them set the alpha value of the pixels with the color you want to transparent 0 (fully transperant).

    This worked for me.

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2002
    Location
    Valencia
    Posts
    6

    Re: blend one color in a texture

    ok, this is the idea, but with which glfunctions can i do it??,
    Tnx.
    Liso.
    Linux has you...
    --
    Liso -Eadem Mutata Resurgo-
    Linux has you...

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: blend one color in a texture

    You'll have to check the color of each pixel and set the alpha value accordingly yourself. OpenGL doesn't provide a function to do that automatically for you.

    P.S.

    Linux will never have me!!

    [This message has been edited by Deiussum (edited 03-06-2001).]
    Deiussum
    Software Engineer and OpenGL enthusiast

Similar Threads

  1. Blend selected color components?
    By Tom Sharpless in forum OpenGL: GLSL
    Replies: 16
    Last Post: 11-20-2010, 04:39 AM
  2. Multitexture with independent texture color blend
    By pascalbamford in forum OpenGL: Advanced Coding
    Replies: 10
    Last Post: 10-17-2009, 11:29 AM
  3. Writing the Blend-Color in the fragment shader
    By Jan in forum OpenGL: General
    Replies: 4
    Last Post: 03-25-2009, 11:28 AM
  4. blend constant color
    By speedy gonzalez in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 11-11-2004, 10:47 AM
  5. how to blend from texture to texture (without using color buffers)
    By Thomas Krog in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 09-03-2003, 05:57 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