1 registered members (TipmyPip),
18,574
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Toon shader & fog colors?
[Re: Hummel]
#373898
06/13/11 23:29
06/13/11 23:29
|
Joined: Apr 2011
Posts: 67 Balkan
Pavle
OP
Junior Member
|
OP
Junior Member
Joined: Apr 2011
Posts: 67
Balkan
|
This also doesn't seem to work, unless the nofog is checked on a model the outlining color is still the same as the active fog color:(
I made a few tests, it looks like the code is working when level is compiled with GS version7.84 but not with GS version 7.50. Is there any way I can reproduce the same effect with 7.50? I tried replacing default.fx from 7.50 with the one from 7.84 by putting it in the same folder as the level but the effect was the same.
Last edited by Pavle; 06/13/11 23:52.
|
|
|
Re: Toon shader & fog colors?
[Re: Pavle]
#373899
06/13/11 23:51
06/13/11 23:51
|
Joined: Mar 2006
Posts: 2,252
Hummel
Expert
|
Expert
Joined: Mar 2006
Posts: 2,252
|
still strange, try this:
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; 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(); } }
What graphics card do you have and did you try to update your drivers?
|
|
|
Re: Toon shader & fog colors?
[Re: Pavle]
#373994
06/14/11 19:08
06/14/11 19:08
|
Joined: May 2005
Posts: 2,713 Lübeck
Slin
Expert
|
Expert
Joined: May 2005
Posts: 2,713
Lübeck
|
@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:
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();
}
}
|
|
|
|