Originally posted by PH: Is it really worth the trouble to build connected loops while extracting the silhouette ? Or put another way, is anyone actually doing this and can confirm whether this is a definite win ?
Paul,
No hard evidence on this. It is mostly a function of how individual architectures make efficient use of bandwidth. Coherence of updates can have a significant impact on the overall fill efficiency.
Well that check there does not check if there were 3 points that are infinite, it only checks two. First it checks if a is an infinite point, then the points get moved over so a now becomes b. Then that code snippet above checks for an infinite point which now is a but used to be b. The third point never get’s checked so this function only checks for two not three infinite points. Here is this function modified by me that is all fixed up.
vec4f compute_homogeneous_plane(vec4f a, vec4f b, vec4f c)
{
vec4f v;
Oh wait I’m sorry cass I see what was going on now. I just saw two pieces of identical code and thought it was not needed. Ok ya I look at it again and see what you mean. Gosh I feel dumb.
Ok I just thought of a way that would still allow 2 infinite points at most that (unlike the code I posted) and would do away with those 9 moves and 3 comparisons.
vec4f compute_homogeneous_plane(vec4f a, vec4f b, vec4f c)
{
vec4f v;
Better, but homogeneous_difference() doesn’t really like two infinite points, so you need to make sure that if two points are infinite that “a” is the non-infinite point.
ARG, that dang homogeneous_difference function. Ya I see that would be bad if there are two infinite points and ‘a’ is one of them. Alright back to the drawing board.
It doesn’t look like Doom3 uses scissor per object but per light.
Or what’s an object in a static gameworld?
I don’t think that the portal culling stuff for shadow volumes is that simple than it looks.
Some more information would be nice.
For example you can use a portal’s scissor rect if the boundingbox of an object is outside the convex hull of the portal and the light, if you look through this portal, so the shadow volume stays in the areas behind the portal.
I think there must be more things like this.
The “Optimized Stencil Shadow Volumes” presentation was great!
[This message has been edited by Liquid (edited 04-24-2003).]
Originally posted by Liquid:
[b]1. It doesn’t look like Doom3 uses scissor per object but per light.
Or what’s an object in a static gameworld?
2. I don’t think that the portal culling stuff for shadow volumes is that simple than it looks.
Some more information would be nice.
For example you can use a portal’s scissor rect if the boundingbox of an object is outside the convex hull of the portal and the light, if you look through this portal, so the shadow volume stays in the areas behind the portal.
I think there must be more things like this.
3. The “Optimized Stencil Shadow Volumes” presentation was great!
[This message has been edited by Liquid (edited 04-24-2003).][/b]
That’s true of the leaked version of Doom3 from a long time ago, but then nobody (that I’m aware of) was doing per-object scissor as a shadow volume optimization back then.
I agree, some examples of of portal culling would have been helpful.