Thursday, May 2, 2013

Graphics Assignment 12

Woohoo! I have added shadows to my Renderer. Overall there wasn't much programming to do all I had to do is add a new Shadow technique, create a new render target for the Shadow map and make some changes to my shaders. The tricky part was getting the shadow effect to look right.

I had a lot of issues with my Shadows looking weird with my normal maps. I tried a lot of tweaking, added a faux pointlight and did all sorts of things. Turns out all I had to do reverse the lightDirection of the directional light, because of which I was getting the wrong dotProduct for calculating the diffuseLight. Yes, you were right JP. :P

Anyways, here is my assignment. Everything works and my shadows look awesome and so do my normal maps.
Download Code



Instructions:
- Use the arrow keys to move the camera and walk around.
- Move the directional light using W,A,S,D

PIX Screenshot of Shadow Map


No comments:

Post a Comment