pass outline
{
CullMode = CCW; // (Commenting these didn't matter) Not really needed, it is the default state
ZEnable = True; // Not really needed, it is the default state
ZFunc = Less; // Not really needed, it is the default state
ZWriteEnable = False;
//cullMode = cw;
vertexShaderConstant[0] = <matWorldViewProj>;
vertexShaderConstant[16] = <vecSkill41>; // outline_thickness
vertexShader = asm
{
vs.1.1
dcl_position v0
dcl_normal v3
dcl_texcoord0 v7
dcl_texcoord1 v8
mov r0,v0
mul r1,c16.x,v3 // scale normal
add r0.xyz,r0.xyz,r1.xyz // shell offset (vertex position + scaled normal)
m4x4 oPos,r0,c0 // transform position to clip space
};
pixelShader = asm
{
ps.1.3
def c0,255,255,0,1 // color outline rgba
mov r0,c0
};
}