one pass diffuse/normal/specular/alpha sm2 shader

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
hebdemnobad
Goblin
Posts: 274
Joined: Wed Feb 09, 2005 5:09 pm
Location: catskill escarpment, new york, usa
Contact:

one pass diffuse/normal/specular/alpha sm2 shader

Post by hebdemnobad » Wed Jan 11, 2012 7:52 pm

jacmoe!


I've figured out how to add an alpha effect to your hardware skinning shader. It involves using a diffuse texture with an alpha map Ii tested it out with a .png file) and changing the final line of your animated animatedNormalSpecular.hlsl file from:

Code: Select all

psOutStruct.color0.a = 1.0f;
to

Code: Select all

psOutStruct.color0.a = tex2D (base_map, psInStruct.uv.yx).a;
should i (or you) edit the wiki or should i post to another page?

-h
0 x

Post Reply