Aggro Cartoon Shader ( Sin City ) ??????

Posted By: Espér

Aggro Cartoon Shader ( Sin City ) ?????? - 04/08/09 17:51

Hi..
Itīs me again.. I wanted to ask if someone is able to create a cartoon shader, to let a model look like in Sin City ( hope you know the comic/movie )...

I need the shader to make everything black/white, like in screen 1 below. And everything thatīs on Skin 2, has to be shown normal ( with colors..etc )..

Movie:
Screen:

Why do i need this?
Iīm helping my Brother doing his Project. He wants to do a Fanfic of Sin City ( other city, other name.. but same style ).

If you can do the shading like in the comics, itīll be better than like in the movie.

Why not using a black/white skin with some colored parts?
because in the light, the skin 1 should be like i created it ( full colored )
But outside of the light, the models should look like black/white.

I hope someone can help me.
Posted By: Ralph

Re: Aggro Cartoon Shader ( Sin City ) ?????? - 04/28/09 20:54

Okay this is not a real shader but I think this is okay...
Code:
MATERIAL* shadeall={
	effect="
		sampler2D g_samSrcColor;
		
		float4 MyShader( float2 Tex : TEXCOORD0 ) : COLOR0
		{
		   float4 Color;
		   float4 Color2;
		   Color2 = tex2D(g_samSrcColor, Tex.xy);
			if (Color2.r > 0.7f && Color2.g < 0.4f && Color2.b < 0.4f)
			{
				Color = tex2D(g_samSrcColor, Tex.xy);
			}
			else
			{
				Color.a = 1.0f;
				Color = tex2D( g_samSrcColor, Tex.xy);
				Color.rgb = (Color.r+Color.g+Color.b)/3.0f;
				Color.rgb -=0.1f;
			}
		   return Color;
		}
		
		
		technique PostProcess
		{
		    pass p1
		    {
		        VertexShader = null;
		        PixelShader = compile ps_2_0 MyShader();
		    }
		
		}

	";
}

//and in the main:
void main()
{
//...
camera.material = shadeall;

© 2023 lite-C Forums