Geometry shader passthrough with Triangle adjacency CGC

Hi everyone!

I would like to be able to generate shadow volumes using geometry shaders.

For that i will be needing triangle adjacency.

So the first thing that i wanted to do is try a passthrough shader, which failed using adjacency (without adjacency i’m able to create a passthrough).

this is how my passthrough with (does not work) adjacency looks like:

TRIANGLE_ADJ

TRIANGLE_OUT

void main(AttribArray<float4> position : POSITION)

{

  emitVertex(position[0]);

  emitVertex(position[2]);

  emitVertex(position[4]);

}

It compiles, but i can’t see any geometry while it’s running.

If i understand correctly, vertex 0, 2 and 4 make up the main triangle…

For my own sanity i also tried a passthrough shader without using adjacency, and it works !

this is how my passthrough without (works) adjacency looks like:

TRIANGLE

TRIANGLE_OUT

void main(AttribArray<float4> position : POSITION)

{

  emitVertex(position[0]);

  emitVertex(position[1]);

  emitVertex(position[2]);

}

I can’t see much that could go wrong here … what’s the problem?

Best regards,

Mitch

Edit: Oh dear, i posted this in the wrong section :) sorry about that…