• Advertisement
Sign in to follow this  

instancing with geometry shader

This topic is 461 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.

Share this post

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

  • Advertisement