Jump to content
  • Advertisement
Sign in to follow this  
Sujal

Hull Shader edge-vertices association

This topic is 2550 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 am trying to find how edges are associated with the vertices in the HULL shader. I want to compute the tessellation factor in HS per edge.

For triangles, it looks like

[font="Times New Roman"] [/font]1. Edge0 -> Vertex1-Vertex2
2. Edge1 -> Vertex2-Vertex0
3. Edge2 -> Vertex0-Vertex1

And for quad, it looks like

[font="Times New Roman"] [/font]1. Edge0 -> Vertex3-Vertex0
2. Edge1 -> Vertex0-Vertex1
3. Edge2 -> Vertex1-Vertex2
4. Edge3-> Vertex2-Vertex3

[font="Times New Roman"] [/font]Does the CW and CCW ordering of ‘outputtopology’ effect this associating? Are there any documentation (I did not find any)? When I look in DirectX SDK samples, ATI’s SDK and NVIDIA’s SDK edge-vertex association seems different.


In Terrain Tessellation sample from nVidia, they use

1.Edge0 -> Vertex0-Vertex1
2.Edge1 -> Vertex3-Vertex0
3.Edge2 -> Vertex2-Vertex3
4.Edge3 -> Vertex1-Vertex2

I am confused.
Thanks



[font="Times New Roman"] [/font]

Share this post


Link to post
Share on other sites
Advertisement
The outputtopology directive is actually for the tessellator produced vertices. You should be able to test this out with a specially made geometry - make two quads side by side, and each one should have the opposite vertex winding. Then you can toggle the outputtopology value and see which sides are culled out (also be sure to set the culling up properly in the Rasterizer stage).

Share this post


Link to post
Share on other sites
Thanks Jason...I did the test and found out that changing outputtopology does not effect edge-vertex association.......Still, I am not sure why edge-vertex association that works for me is different from what is being used in Nvidia's SDK.


PS. I am planning on buy your book :)

Share this post


Link to post
Share on other sites

Thanks Jason...I did the test and found out that changing outputtopology does not effect edge-vertex association.......Still, I am not sure why edge-vertex association that works for me is different from what is being used in Nvidia's SDK.

Have you inspected the Rasterizer state of those other samples? Perhaps they are using two sided geometry or something like that, which makes it appear like it is changing when it really isn't... You can easily review these states with PIX, so I would suggest taking a frame grab of each sample and compare what they are using (inspecting all of the states would probably be useful...).

PS. I am planning on buy your book :)
[/quote]

Sounds great :)

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!