- Home /
Same mesh with different topologies?
I'm writing a geometry shader for grass and I'm feeding the shader the same meshes used for terrain. The problem is that terrain meshes are made up of triangle fans, so most of the time any given vertex is shared by either four or eight triangles. This means that visually, not only the shader is missing most of the vertices in the mesh, but it's also re-creating geometry (up to eight times) for the same few vertices it processes.
I'm wondering if it's possible to create a mesh with a different topology ("Point" in this case) that shares everything but the indices with another one? Having to duplicate all the internal buffers is just overkill and I want to keep it as much low profile memory-wise as possible.
Thanks
Your answer
![](https://koobas.hobune.stream/wayback/20220612175328im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Shader: Mesh with Grass and Wind 1 Answer
Replacing a geometry shader with a compute shader. How do I output an arbitrary number of triangles? 0 Answers
Mesh dissapearing from Resources 0 Answers
Generate a mesh around a LineRenderer 2 Answers
How to confirm the vertex of a mesh that mouse in and change its texture 0 Answers