Jump to content
  • Advertisement
Sign in to follow this  
giugio1977

instancing with geometry shader

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

I reformulates a question.
hello , i have a lot of 2d shapes of 4 point , are always parallelograms
With the extrusion they have 8 points and my idea is to do the extrusion on the cpu, save all vertexes of extrusion in a texture and do a instancing drawing and in in the geometry shader I wish take the points from the texture so i can do a batch draw of many many 1 point and in the geometry shader read the points from the texture and emit the vertexes.
I try to do this because any my geometry  is similar and i have a lot of meshes.
Another approach is do an instance with a scale matrix (that is a 3d vector) then do only  a transformation on all points but i can't create a scale matrix from a base rectangle and a parallelogram that aren't similar but for rectangular shapes of different sides I think that this can be done.
Naturally i have a texture with the scale matrix or correct extruded vertexes and an instance id for take the vertex or the matrix from the texture with a sampler.
Thanks

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!