previous |  up  | next
 

Color Keying with GLSL   

Author:  DigiBen

Color keying, also called “punch out alpha”, is the rejection of drawing a pixel based on a predetermined color value.  If the pixel to be drawn matches the color key it is skipped and not drawn, otherwise rendering happens as normal.  This tutorial shows how to use the GLSL “discard” command to accomplish color keying.

Functions Used:  glEnable(), glActiveTextureARB(), glMultiTexCoord2fARB(), glGenTextures(), glBindTexture(), gluBuild2DMipMaps(), glTexParameteri(), glLoadIdentity(), gluLookAt(), glDisable(), glCreateShaderObjectARB(), glShaderSourceARB(), glCompileShaderARB(), glCreateProgramObjectARB(), glAttachObjectARB(), glLinkProgramARB(),  glUseProgramObjectARB(), glGetUniformLocationARB(), glDetachObjectARB(), glDeleteObjectARB(), glGetString(), wglGetProcAddress()


purchase full version
Access EXE

 
 
 

 

 

 


 C
 C++
 Win32
 Direct3D
 OpenGL
 C#
 Java
 Free Tutorials