Skip to main content
gamedev.net
🔒 Locked

Multiple Alpha channels?

Started by reuomi Oct 14, 2005 at 7:17 PM 1 replies 350+ views
Original Post
reuomi
reuomi
is it posible to have multiple alpha channels? Say on one texture you want to have bump mapping, and transparency. is that posible with a single texture?(dds)
Indy to Pro: Journeyhttp://phiendstudios.blogspot.com
Namethatnobodyelsetook
Namethatnobodyelsetook
As normal map bump mapping doesn't need alpha, then sure, use A8R8G8B8, with the normal map in RGB, and the transparency in A.

If you mean for parallax mapping where you need height information, often stored in A, the answer is still a tricky yes. Put the normal XY in RG, calculcate the normal Z (since the normal is a unit length vector, you can do this from the X and Y) in the shader. Put height in B, and alpha in A.

Other tricky uses would be calculating the normals based on taking multiple samples from height. You could get away with an A8L8 16 bit texture that way, or have two more values free to play with.

As a general rule though, no, there aren't any texture formats that hold more than 4 numbers at once, nor is it likely to happen anytime soon as the pixel shader architecture is based on 4 element vectors.
Sneftel
Sneftel
You can also do more complicated things in shaders with packing and unpacking values, to store a larger number of scalars. But your best efficiency will probably come from simply having multiple textures.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.