Thursday, 9 April 2009

Shadows and Optimisation



A little overdue for an update this time as some things got in the way briefly. I've managed to implement some basic shadow mapping which took about 3 days in all. Shadow mapping is a fairly simple concept. A depth map is made from the light's world, view and orthographic/perspective. This same transform is then used to project the depth map onto the hair in the pixel shader. As much as i would have liked to try and do Deep Opacity mapping for the shadows I suspect time is now far too short to try to implement them. Also performance is becoming an issue as it is beginning to fall further beyond acceptable levels.

Other than shadow mapping I've made a few minor optimisations. I managed to move the calculation of part of the diffuse lighting term to the vertex shader. Also I changed the way I was doing the WVP transforms for the hair strips. I suspect the major bottlenecks in the application are focussed around the vertex buffer.

Also I've been trying to work on arranging the hairs better though that's proving awkward without making a mess.

No comments: