Sign in to follow this  
Quat

d3d10 adjacent primitives

Recommended Posts

Quat    568
Suppose you have geometry stored in buffers that contains triangle lists with adjacency. If you draw the geometry with a null geometry shader, it does not draw the adjacent triangles, correct? Adjacent triangles are only used for geometry shader, right?

Share this post


Link to post
Share on other sites
swecoder    181
Hello!

I think that you (or maybe me:)) have misunderstood what adjacent triangles really are. For example if you have two triangles in a vertex buffer they will automatically be adjacent to each other.

Take a look at this page, http://msdn2.microsoft.com/en-us/library/bb205124.aspx

Good Luck!

Share this post


Link to post
Share on other sites
Quat    568
Quote:

For example if you have two triangles in a vertex buffer they will automatically be adjacent to each other.


You can have two triangles in a vertex buffer that are disjoint.

Share this post


Link to post
Share on other sites
swecoder    181
Quote:
Original post by Quat
Quote:

For example if you have two triangles in a vertex buffer they will automatically be adjacent to each other.


You can have two triangles in a vertex buffer that are disjoint.


Yes, but if you look at the link i posted the theory might not be the same as for standard triangle lists. If you have disjoint triangles in a buffer the adjancent topology might not work as expected.

More info: http://www.gamedev.net/community/forums/topic.asp?topic_id=464067

Share this post


Link to post
Share on other sites
Quat    568
From that link, for triangle list with adjacency, you specify 6 vertices per primitive, which define 4 triangles. The "main" triangle, and its 3 adjacent ones. So my question was, if you render one of these primitives, does it render only the "main" triangle, or also the adjacent ones.

Share this post


Link to post
Share on other sites
jollyjeffers    1570
Adjacency information is purely informational - it gives a particular GS invokation more context about the data it's supposed to be processing.

However, in order for the GS to get adjacency information you need to have executed the VS on all 6 of the vertices, so unless your GS is clever and culls some geometry you will get adjacent primitives rendered.

At least that's my take on things - I've not done much work with GS+ADJ yet.

hth
Jack

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this