Hello all -

I would like to have an entity that can use overlay with the toon shader.

I have been studying shaders, and am in no way an expert -
how would I fix this shader, to use overlay, or even trasparency?

Code:
material mtl_toon//Josh Arldt
{
	skin1=bmp_toonlookup;
	effect =
	"
	matrix matWorldViewProj;
	matrix matWorld;vector vecSunDir;
	texture entSkin1;texture mtlSkin1;
	
	technique t0{
		pass p0 // shade it
		{
			zwriteenable= true;
			zenable = true;
			Texture[0]=<mtlSkin1>;
			ColorOp[0]=Modulate;
			ColorArg1[0]=Texture;
			ColorArg2[0]=Texture;
			AddressU[0]=Clamp;
			AddressV[0]=Clamp;
			AddressW[0]=Clamp;
			TexCoordIndex[0]=0;
			Texture[1]=<entSkin1>;
			ColorOp[1]=Modulate;
			ColorArg1[1]=Texture;
			ColorArg2[1]=Current;
			TexCoordIndex[1]=1;
			VertexShaderConstant[0] = <matWorldViewProj>;
			VertexShaderConstant[4] = <matWorld>;
			VertexShaderConstant[7] = <vecSunDir>; 

			VertexShader =		asm
			{
				vs_1_0
				dcl_position  v0
				dcl_normal    v3
				dcl_texcoord0 v7
				dcl_texcoord1 v8
				mov oT2.xy, v7
				dp4 oPos.x, c0, v0
				dp4 oPos.y, c1, v0
				dp4 oPos.z, c2, v0
				dp4 oPos.w, c3, v0
				dp3 r0.x, c4.xyz, v3.xyz
				dp3 r0.y, c5.xyz, v3.xyz
				dp3 r0.z, c6.xyz, v3.xyz
				dp3 oT0.x, r0.xyz, -c7.xyz
				mov oT1.xyz, v8
			};
		}
	}";
}



Any Suggestions?

Regards,
Devon.

Last edited by DevoN; 06/22/11 21:27.

A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com