Out.Pos = mul(Pos, matWorldViewProjection);Out.hemi = saturate(dot(normalize(lightWorldPos - Pos.xyz), normalize(mul(Normal, matRotation).xyz)));
Off topic, but it helps to include the coordinate space of positions and vectors. This gets really useful when you are doing any combination of operations in object, world, view, clip and tangent space all in the same shader.
Quote:i don't get what you mean here. isn't the .w var uninteresting?
I haven't had this problem myself but heard about it from Jack's journal entry
Quote:Almost as stupid as the time I forgot to specify .rgb and my normalization was working on a 4D instead of 3D vector. That was an odd mistake to track down and fix...