example i have a light object a wall and another object behind that wall,
the object behind that wall can still be lit up.
Heres the illustration
| W | | A | point ligh | L | object <--- Camera looking behind the wall | L |
SInce the object normal is facing the point light, it is lit up.
If I understood what you are asking Im guessing you are a beginner in DirectX...
(Unless you are using a raytracer) Simple lighting shaders dont take into account if an object is occluded or not... They simply calculate the influence of a light in a object based on the view point, etc.
To do what you want to accomplish you must implement shadow mapping, but it might be "too advanced" for you, idk take a look at the link and google. If you have any question just ask
Yes, Im new to HLSL and i understand that Lighting does not take into account if an object is occluded
or not that is why Im asking people where on how to fix the problem i posted above.
Adding shadow map, is a good idea ill try that one.
Anyways, other than shadow map, is there any other approach?