Jump to content
  • Advertisement
Sign in to follow this  
EmptyVoid

Geometry shader for LOD?

This topic is 3670 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 don't really know what a geometry shader is but I think it could be used for LOD kinda like tessellation, am I right? If so would it be fast enough for terrain LOD?

Share this post


Link to post
Share on other sites
Advertisement
A geometry shader executes before the vertex shader stage. In the GS, you can create triangles, lines, points. Yes, I guess you can do LOD with it but I have zero experience.

Share this post


Link to post
Share on other sites
No, countrary to the popular belief you cannot do LOD with geometry shaders.

You cannot do it efficiently on current NV hardware, possibly not even in the next generation. Ati claims to have a better performance on paper, this doesn't imply it's enough.

You cannot do it with GS alone: you'll need at least to mess up with the stream-out (xform feedback) mechanism which, as far as I've been told, it's still not as robust, fast and flexible we would like to. I don't think this is going to be a win performance wise regardless of the hardware used since it degenerates the command stream in a sequential one.

Most examples about GS lod run on multiple frames and on non-generic meshes. You'll see terrains, metaballs and such but not generic architecture.

Good LODders are not trivial.

Share this post


Link to post
Share on other sites
Quote:
Original post by Krohm
No, countrary to the popular belief you cannot do LOD with geometry shaders.

You cannot do it efficiently on current NV hardware, possibly not even in the next generation. Ati claims to have a better performance on paper, this doesn't imply it's enough.

You cannot do it with GS alone: you'll need at least to mess up with the stream-out (xform feedback) mechanism which, as far as I've been told, it's still not as robust, fast and flexible we would like to. I don't think this is going to be a win performance wise regardless of the hardware used since it degenerates the command stream in a sequential one.

Most examples about GS lod run on multiple frames and on non-generic meshes. You'll see terrains, metaballs and such but not generic architecture.

Good LODders are not trivial.


Thanks that's what I needed to know but this also leaves me with another question. Is there any real reason with current hardware to use a geometry shader?

Share this post


Link to post
Share on other sites
Quote:
Original post by EmptyVoidThanks that's what I needed to know but this also leaves me with another question. Is there any real reason with current hardware to use a geometry shader?
Yes, it can be useful for some effects. The geometry shader is especially slow if it outputs a lot of extra geometry. If that is not the case, it's still not as fast as you would like, but more or less acceptable.

For example you can use it to extrude fins at silhouettes for fur rendering. You could of course do that in the vertex shader too, but at the cost of submitting a lot of degenerate triangles.
Speaking of degenerate triangles, drawing shadow volumes from silhouettes comes to mind, too. I'm not aware of any real implementation that does this, but in theory it might work ok, not much worse than most other algorithms, anyway.

Rendering the 6 faces of a cube map in one pass is an example where both geometry shaders and transform feedback have been used successfully, although GS didn't prove to be terribly much faster than separate passes on current hardware.

Share this post


Link to post
Share on other sites
Quote:
Original post by samoth
Quote:
Original post by EmptyVoidThanks that's what I needed to know but this also leaves me with another question. Is there any real reason with current hardware to use a geometry shader?
Yes, it can be useful for some effects. The geometry shader is especially slow if it outputs a lot of extra geometry. If that is not the case, it's still not as fast as you would like, but more or less acceptable.

For example you can use it to extrude fins at silhouettes for fur rendering. You could of course do that in the vertex shader too, but at the cost of submitting a lot of degenerate triangles.
Speaking of degenerate triangles, drawing shadow volumes from silhouettes comes to mind, too. I'm not aware of any real implementation that does this, but in theory it might work ok, not much worse than most other algorithms, anyway.

Rendering the 6 faces of a cube map in one pass is an example where both geometry shaders and transform feedback have been used successfully, although GS didn't prove to be terribly much faster than separate passes on current hardware.


I could see the shadow thing being kinda useful but I think I'll ignore that part of the DirectX 10 features for now.

Share this post


Link to post
Share on other sites
Quote:
Original post by samoth
Quote:
Original post by EmptyVoidThanks that's what I needed to know but this also leaves me with another question. Is there any real reason with current hardware to use a geometry shader?
Yes, it can be useful for some effects. The geometry shader is especially slow if it outputs a lot of extra geometry. If that is not the case, it's still not as fast as you would like, but more or less acceptable.

For example you can use it to extrude fins at silhouettes for fur rendering. You could of course do that in the vertex shader too, but at the cost of submitting a lot of degenerate triangles.
Speaking of degenerate triangles, drawing shadow volumes from silhouettes comes to mind, too. I'm not aware of any real implementation that does this, but in theory it might work ok, not much worse than most other algorithms, anyway.

Rendering the 6 faces of a cube map in one pass is an example where both geometry shaders and transform feedback have been used successfully, although GS didn't prove to be terribly much faster than separate passes on current hardware.
I agree. Those are good examples (not exactly LOD as intended in conventional wisdom however). Besides having point->particles expansion, I'm generally not impressed (oh look, I can do shadow extrusions! Too bad I use shadowmaps!).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!