   cel shading & painter
  i don't understand my shader. i've read some cel shadinh tutorials and articles and i think i now understand how it works. i've tried to rewrite the code from the direct x 8 tutorial from gamedev (< href="http://www.gamedev.net/reference/articles/article2021.asp">here) because i'm using hlsl. i didn't use the asm code, but the description.i've got a simple shader atm, wich simulates diffuse lighting:// PixelShader:return tex2D(SkinSampler, Tex0) * Hemi;// Hemi ist just the dot product n.L// both vectors were normalized before and the result gets clamped to [0, 1]this kind of lighting works perfect and i didn't encounter any problems.but when i tried this one, the lighting wasn't correct any longer:float2 Tex1;Tex1.x = Hemi.x;Tex1.y = 0.0f;return tex2D(SkinSampler, Tex0) * tex2D(PaintSampler, Tex1);i used tex2D because i haven't used tex1D yet, but i tried both and the result was the same.here you can see screens: ( diffuse | quanterized | quanterized )*edit* here is the image used for it:[Edited by - SiS-Shadowman on June 1, 2006 12:23:29 AM]