hello all
please don't answer me if you :
1/ doen't interest by the question;
2/ if you are not concentrating;
3/ no hazardeuos answers;
this is my opinion, is it correct :
the picture below describes a method to draw shadow in 3D space using a simple technique, if we have the P as a point light AND we have the vertices of the object as N (example = teapot) AND we have the vertices of the shadowed object as M (example = floor or plane),
if (dot(NP, NM) == -1)
the vertex M is in shadow
else
the vertex M is not in shadow
(we all know the vertices NP & NM must be normalized) & using the floor() function of HLSL because the dot() function gives us a value like -0.999999 so we down to the least integer (i mean floor(dot(NP, NM)) == -1).