GeometryShader, triangle missing on camera rotation

Hi,

I’m testing a new pipeline system and I’d like to integrate some geometry shader to it. I’m not trying to use GSFX here, I’d like to have one shader responsible for the whole rendering pipeline.

The attached shader is just exploding triangle along their normals which is working but some triangles disappear when camera is rotating. I don’t know if that’s because some vertex are missing after or if that’s a normal problem.

Any hint ?

Thx

GeomFX.zip (2.8 KB)

Its not backface culling is it?

No it’s not, in the patch provided I used no culling but even back face or front face have same problem.
I know that if we make a GSFX we need to provide a MaxVertexCount, anyone knows if that matter when you do VertexShader => Geometry Shader => Pixel Shader without StreamOut ?

This because you do output.pos = mul(input.posObject,mul(tW,tVP)); in the VS and not in the end of GS
after you did that, you are not anymore in xyz worldspace, but instead you are in a projected camera space, so messing with it as if it was plane 3d world not gonna work anymore…

you need to have mul(p,tVP) after you do + (normamt) operation
or do float4 var = mul ((norm
amt),tVP) and try to add that instead

Yes indeed, just found that. Thanks for the answer anyway.
Cheers Anton.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.