Author Topic: about Binary alpha map  (Read 2239 times)

0 Members and 1 Guest are viewing this topic.

maggie

  • Associate
  • Posts: 1
about Binary alpha map
« on: September 08, 2007, 08:41:24 AM »
Lately,I am intrested in the Moving Grass. I want to make it with glsl ,but I don't know  What's the Binary alpha map. How to realize it . I need to have a look  at the code.Can you help me?   

JeGX

  • Global Moderator
  • Capo Crimine
  • *****
  • Posts: 2357
    • oZone3D.Net
Re: about Binary alpha map
« Reply #1 on: September 10, 2007, 06:33:55 PM »
Did you see the code sample 83 ?
http://www.ozone3d.net/repository_hyperion_cs_vps.php#cs_83

The binary alpha map is just a way to create, a texture with the alpha chanel filled with 1 (if fully opaque) or 0 (if fully transparent).
In the code sample 83, the alpha chanel of the grass texture contains 0 if rgb == <0,0,0> or 1 if rgb != <0,0,0>. <0,0,0> or black is the transparency color.