Hey guys,
This is proberly my first shader ive made, I read the basic pixal shader instructions (from a tutorial) then started programming my own one. I added some cool stuff to it such as ripply effects and made it move (thanks to someone helping me on the forums
)
Heres a screenshot:
(hosted by ImageShack)
Heres a .ZIP that comes with the scripts, the images needed for the shader to work, and a .EXE demo:
GoldMarbleShader.zip Heres the code:
Code:
Bmap AlphaMap = <Stone.TGA>;
Bmap EffectMap = <marble.BMP>;
Material ShinyPillar
{
Skin1 = AlphaMap;
Skin2 = EffectMap;
Effect"
Texture entSkin1;
Texture entSkin2;
Texture mtlSkin1;
Texture mtlSkin2;
Matrix matMtl;
Technique Test
{
Pass P0
{
Texture[0] = <entSkin1>;
Texture[1] = <entSkin2>;
Texture[2] = <mtlSkin1>;
Texture[3] = <mtlSkin2>;
TexCoordIndex[0] = 1;
TexCoordIndex[1] = 0;
TexCoordIndex[2] = 1;
TexCoordIndex[3] = 1;
PixelShader = asm
{
ps_1_2
tex t0
tex t1
texdp3tex t3,t0
dp3 r0,t3,t0
mul r0,r0,t1
add r0,r0,t1
};
texCoordIndex[3]= cameraSpaceNormal;
textureTransform[3]=<matMtl>;
}
}
";
}
Hope to hear your comments soon
If you have any problems running the shader then please contact me. My email is:
wadaholic@gmail.com Thanks
-Bright