Jump to content
  • Advertisement
Sign in to follow this  
BelkacemTuxLm

geometry shader not work ! any help

This topic is 2608 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

hi again !

i read this topic about geometry shader and i understand that this part of diret3d using to generate new vertices in gpu

http://takinginitiative.net/2011/01/12/directx10-tutorial-9-the-geometry-shader/


and i want to apply it in my 3D Application , so i wrote a shader that get one vertex and generate lot of vertices as point primitive

the problem is that if i use the geometry shaderi can't sea any thing but if i ignord the gs ( geometry shader ) i success to render the vertices.

the source code

shader.fx
http://pastebin.com/raw.php?i=59Su8ayt


main.cpp
http://pastebin.com/F8qrxUh6


any help and thak you .

Share this post


Link to post
Share on other sites
Advertisement
Are you sure you want the geometry shader to output points instead of triangles???

I think you should replace this line:
void GS (point VS_OUT input[1] , inout PointStream<PS_INPUT> pointstr )

with:
void GS (point VS_OUT input[1] , inout TriangleStream<PS_INPUT> pointstr )

Share this post


Link to post
Share on other sites
For a point stream you shouldn't need the restart strip statement. Also, what is your output like when using the geometry shader? Are you sure that your draw call is being executed, or is there any errors reported on the debug window? You can also take a look at your rendered output with PIX to see more precisely what is going on...

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!