Geometry Shader: distortions

Posted by Christophe Lionet on Game Development See other posts from Game Development or by Christophe Lionet
Published on 2012-12-09T00:15:32Z Indexed on 2012/12/09 5:20 UTC
Read the original article Hit count: 426

Filed under:
|
|
|

This is a cross-question from Stack Overflow, I thought it would be more appropriate here. There is a lot of code I could be posting. To avoid overloading the page with code, I will post any part of the code if requested.

I am working from the ParticleGS DirectX10 sample, to build a geometry shader based particle system in DirectX 11.

Using the sample code, and changing it to my liking, I am able to draw a single quad (which is essentially one particle constantly recreating itself).

However, I noticed a problem which was similar to one I once had: the rendered shape is distorted. Here is a video showcasing what is happening. http://youtu.be/6NY_hxjMfwY

Now, I used to have this issue when using several effects together, when I realised that I needed to explicitely set the geometry shader to null for the other effects. I solved this problem, as you can see in the video, as the rest of the scene is drawing properly. Note that some sides are being culled somehow, although I turned off culling in my main render state. The texturing is fine too, the texture draws with appropriate proportions relative to the quad.

I really don't see what I could be doing wrong here... what would cause the geometry shader to behave in such a way? Again, I will post any piece code you will request.

© Game Development or respective owner

Related posts about directx

Related posts about shaders