Join (It's Free!) | Free Icons |
Create a Greetlet |
Average Member Rating:
Rate this Greetlet:
The EDIT button allows you to create a new Greetlet using this one as a template.
By Anonymous 5 Years Ago
Yes, I'm aware of Manders' technique. I thgouh hard about doing all those computations on the GPU myself, but there is a big difference between our samples.He only has lines for which to draw shadows, while I have polygons with arbitrary number of edges. For a line, no matter of the light's position relative to it, the shadow always has the same shape. This is not so for a polygon, and depends both on the shape of the polygon and on the position of the light. One way to do this would be to draw the shadow volumes for each edge of the polygon, in the same way as Manders draws shadows for his lines, but depending on the level of detail of that polygon, this could result in a great number of Draw calls (order of tens), as opposed to a single Draw call for the whole object's shadow, as it happens now. These add up, and may actually hurt performance more than benefit it.This is one area where DirectX10 geometry shaders would come in handy, as they could be used to generate the shadow's geometry on the GPU, for any convex shape imaginable. But since XNA is DX9 only, for now I'll have to stick to doing all this on the CPU.One other idea would be to move these computations on another thread, and use multi-threading, but this is dangerous territory as well.
Greetletssm - © Copyright 2006 Tetrio, Inc. - all rights reserved.