About Alpha-channel

Just a list which shader uses alpha-channel for what. It’s not all of them, only ones I used & figured out.

  • Most shaders (ksPerPixel, ksPerPixelReflection, ksPerPixelAT, etc) uses alpha-channel of txDiffuse for transparency (but it could be seen only if BlendMode isn’t eOraque), pretty obvious.
  • But not NM shaders (ksPerPixelNM, etc), they ignore alpha-channel from txDiffuse and use alpha-channel of txNormals. I suppose this way it’s easier to colorize some stuff later in skins (you don’t need to worry/can’t change alpha-channel).
  • And not MultiMap shaders (such as ksPerPixelMultiMap, ksPerPixelMultiMap_damage_dirt, ksPerPixelMultiMap_NMDetail), they use alpha-channel from txDiffuse to see where txDetails should work and where shouldn’t. And also, they use alpha-channel from txDetails: the more brighter gets alpha-channel of txDetails, the more specular size (or less ksSpecularEXP) will be. Usually used for flakes effect (take a look at those txDetails textures, often their color is solid, only alpha-channel is different).
  • Special case is ksPerPixelMultiMap_AT: it uses alpha-channel of txDiffuse as other MultiMap shaders, but also it uses alpha-channel of txNormals, as NM shader. So, with this shader you could easily implement colorized rims very useful way: only one 8×8 texture will colorize static and blurred rims at the same time! And also, of course, with baked shadows and stuff. If you want more details, check out RX-7 sources.
  • Two special shaders — ksTyres and ksBrakeDisc — uses alpha-channel of txDiffuse as specular and reflection level. Perfect to make holes in brake discs and even overall occlusion.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s