Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Enfekted

Performance Issues with Shadow Volumes

This topic is 5630 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a test scene with 20 meshes with a total of 2300 triangles and 2 light sources. With shadows rendered the frame rate is about 10-15 FPS, without shadows rendered the frame rate is about 150 - 250 FPS. I know Shadow Volumes are slow, but this seems a bit absurd. Does this seem normal to anyone? I'm using an adapted Shadow Volume Class from the DirectX 9 Shadow Volume example. [edited by - Enfekted on April 20, 2003 3:46:47 PM]

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
if that sample''s anything like the dx8.1 one, it''s highly in-efficient. it was made to show you how to use the stencil buffer to render shadows, not how to do it "the right way."

both nVidia and ATi have really good samples to look at, that not only solve problems that the DX samples don''t but also have optimized techniques for getting the stencil shadows rendered.

just curious though, is that sample like the dx8.1 one? i.e., it uses the depth pass technique with 2 renders of the extruded shadow volumes to the stencil buffer and then a render of a render buffer-sized, alpha-blended quad to get the stencil buffer data to the color buffer?

Share this post


Link to post
Share on other sites
Which nvidia demos are you talking about? Apart from the fixes for camera-in-shadow and the far-plane clipping glitches I don't see too much difference in their method... at least none that would cause big performance improvements.... except for that shader example, which is excellent but not hugely supported.

Learning to fly is easy, but as a tortoise, the landings are really rough.

[edited by - SoaringTortoise on April 20, 2003 5:09:22 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by SoaringTortoise
Which nvidia demos are you talking about? Apart from the fixes for camera-in-shadow and the far-plane clipping glitches I don''t see too much difference in their method... at least none that would cause big performance improvements.... except for that shader example, which is excellent but not hugely supported.

yeah, i was mainly talking about the use of depth fail to solve the 2 problems you mentioned, which are big fixes as far as moving cameras go. they do have a new demo and GDC presentation up at http://developer.nvidia.com/view.asp?IO=shadow_volume_intersection that''s quite interesting re: fill rate. ati also has a dx8.1 sample that uses a vertex shader that will run on dx7 hardware. it uses a series of static shadow vertex and index buffers regardless of whether your objects, lights, and/or camera are moving.

but mainly i was talking about the MS sample''s implementation of the technique. they used DrawPrimitiveUP for rendering the shadow volume for goodness sake and they rebuilt the edge list every frame whether they needed to or not. and they rebuilt the shadow volume vertex list every frame whether they needed to or not. and they cleared the stencil buffer every frame whether they needed to or not. and they didn''t bother to show you how you could use a simpler mesh for creating the shadow volume even though they have this nice progressive mesh capability. and...

Share this post


Link to post
Share on other sites
You should use vertex shaders if you want to have good performance. Check this tutorial:
http://www.booyah.com/article04-dx9.html

Share this post


Link to post
Share on other sites
Must say that I am very keen to use the vertex shader solution. Any idea what hardware will support it?

Learning to fly is easy, but as a tortoise, the landings are really rough.

Share this post


Link to post
Share on other sites
It''s suported by nvidia cards from GeForce 2 and corresponding ATI video cards (imho from 7000 or smth like this). Check on ATI and nvidia website for more detailed info.

Share this post


Link to post
Share on other sites
Wasn''t there a database of all device caps published somewhere? I seem to remember seeing a link for it on these forums a long while back.

Learning to fly is easy, but as a tortoise, the landings are really rough.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!