Damn MOP, you are so fast! I need to setup alpha as 1-bit in Infernal Engine to cast shadows as the set only cast shadows from meshes that has 1bit alpha only.
Most engines I've seen are smart enough to work out that a texture with only black and white in the alpha channel is to be interpreted as a 1-bit alpha.
But as Eric says, there will tend to be a setting somewhere to allow you to specify it as an alpha test.
on the subject of alpha testing, here's a great article by valve on generating distance fields for alpha data. yields much nicer looking results than traditional methods, and is super easy to implement
Most engines I've seen are smart enough to work out that a texture with only black and white in the alpha channel is to be interpreted as a 1-bit alpha.
Really? Most engines I've seen, you have to tell it to use the alpha channel as a 1-bit alpha, unless the stuff you've used does it automatically (ie. always assume alpha-channel in a diffuse texture is to be used as alphatest) which makes some sense, but it's not really the engine working out that it's a 1-bit alpha based on the value of the pixels in the alpha channel.
I doubt there are many engines which detect if any mid-grey pixels are in the alpha channel and use that to determine what type of transparency to use...
I'm using Infernal Engine, and yes, there is a alpha testing thing that you can set your alpha to only render on a "x"value. But even like that its not working as it supposed to be. But thanks guys.
Replies
If you're thinking of "1-bit alpha", that's just a term used to define off/on transparency.
But as Eric says, there will tend to be a setting somewhere to allow you to specify it as an alpha test.
Which engine is it you're using?
www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf
Really? Most engines I've seen, you have to tell it to use the alpha channel as a 1-bit alpha, unless the stuff you've used does it automatically (ie. always assume alpha-channel in a diffuse texture is to be used as alphatest) which makes some sense, but it's not really the engine working out that it's a 1-bit alpha based on the value of the pixels in the alpha channel.
I doubt there are many engines which detect if any mid-grey pixels are in the alpha channel and use that to determine what type of transparency to use...
I'd really like to read that
I know that unity can't have an object use lightmaps and transparency at the same time (as far as i know)
that might be related to the issue you're havin... ??