Draw multiple material using Graphics.DrawMesh
I'm trying to render ~1000 meshes, some of which are transparent some which aren't.I have to use 2 different materials because if i use the transparent material for the non transparent parts it works but i get rendering artifacts due to the sorting being off.
Things i have tried:
Calling Graphics.DrawMesh twice, one for each material. This just renders everything with the second material.
Graphics.DrawMeshNow. There is no lighting/shadows.
GameObjects and MeshRenderer. Didn't try this due to the overhead and maintenance of keeping track of all the GameObjects.
Is there another way to render from scripts that allows more than 1 material being used or am I out of luck?
Your answer
Follow this Question
Related Questions
Did the new scriptable render pipeline system break Graphics.DrawMesh()? 1 Answer
How to pass a RInt RenderTexture to a ComputeShader? 0 Answers
Weird default reflections in Shader Graph 1 Answer
Grass / Details disappear when i import lightweigh render pipeline (Unity 2018.2.0f2) 0 Answers
Normal map issue (direction) 0 Answers