- Home /
Problem is not reproducible or outdated
My mesh is spagetti??!
Hey! So I decided to calculate noise on a compute shader for my infinite terrain. My issue is when I get the data the mesh I get in return is spaggetti. Like they arent connecting to the correct vertices. What I do is give the shader the vertices and it returns the vertices with the height data. I know that it wont return the vertices in order so I made a triangle struct to make sure they return correctly but it doesn't seem to work. Is there something I'm missing that I need to take in to account while working with compute shaders? Thanks
Answer by BRW_arjan · Oct 04, 2019 at 09:54 AM
Unity can change the order of the vertices when importing. You might be able to fix that by turning off optimize mesh. Another option is to generate the mesh yourself. That way you will know for sure the order of the vertices.
Follow this Question
Related Questions
Using compute shader, how to take every vertex of a mesh and make a cube spawn and move to each one? 0 Answers
Advance mesh alteration: Whittling wood 0 Answers
Compute Shader performance is dropping from a single boolean. 2 Answers
Replacing a geometry shader with a compute shader. How do I output an arbitrary number of triangles? 0 Answers
Create Mesh from Triangle Data Created on ComputeShader 0 Answers