Originally Posted By: Pavle
@Hummel
@Bart the 13th
The color of outlining is now, with the Hummel's modifications, solid black when I check nofog on a model. The problem is that I use fog in the levels & need models to be influenced by the fog's density but not fog's color.


I think he means this:
Code:
void PS_Outline(
out float4 COL :COLOR0
)
{
COL=float4(0,0,0,1);
}


technique toon
{
pass one
{
VertexShader = compile vs_1_1 toonVS();
PixelShader = compile ps_1_4 toonPS();
}
pass two
{
CullMode = CW;
FogEnable = false;
vertexShaderConstant[0] = <matWorldViewProj>;
vertexShaderConstant[16] = <vecSkill41.y/20.>;

VertexShader = asm
{
vs_1_0
dcl_position v0
dcl_normal v3
dcl_texcoord v7
mov r0,v0
mul r1,c16.x,v3
// Scale the normal
add r0.xyz,r0.xyz,r1.xyz
m4x4 oPos,r0,c0
// Transorm position to clip space
mov oD0, c0
mov r0,c0
};

PixelShader = compile ps_2_0 PS_Outline();
}
}