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 3 of 3

Thread: Mask Texture

  1. #1
    Newbie Newbie
    Join Date
    Jun 2013
    Posts
    2

    Mask Texture

    Hello,

    I am trying to to create a texture that will act like a mask in order to change the way it is displayed.
    The mask texture would be like this:
    i469.photobucket.com/albums/rr59/trkpower/mask3.png
    The texture:
    i469.photobucket.com/albums/rr59/trkpower/original.png
    The final result:
    i469.photobucket.com/albums/rr59/trkpower/final.png

    How can i achieve this result?
    Thanks.

  2. #2
    Intern Contributor uwi2k2's Avatar
    Join Date
    Mar 2011
    Posts
    97
    hi,

    there are multiple ways to do this.
    the best i can think of right now, is to pass both textures to a shader and only use the color of main texture where the mask texture is black.
    but i guess you are not familar with shaders ... otherwise you won´t have asked, right ?

    guess you like to do something like this:
    Click image for larger version. 

Name:	Renatus 2013-06-21 19-58-56-90.jpg 
Views:	47 
Size:	31.6 KB 
ID:	1058

    cu
    uwi
    uwi2k2 - OpenGL Trainer: www.opengl-trainer.com
    ---------------------------------------------------------
    Free Programming Helpline: www.programming-hotline.com
    ---------------------------------------------------------
    A Friday Night Programmer: www.uwiworld.net

  3. #3
    Newbie Newbie
    Join Date
    Jun 2013
    Posts
    2
    Hi,
    Unfortunately i'm not familiar with shaders...

Posting Permissions

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