- Home /
Why are my two sided shader faces leaking through each other? (URP shader graph)
I'm trying to make a pine tree for my game, and I've got it pretty much working, however the back faces of the leaves(and other objects behind the leaves) leak over the rest of the faces at certain angles. This specifically occurs when I make them two-sided. Both manually making an inner set of faces in blender, and just checking the 'Two Sided' box in shader graph cause this to happen.(it's using a shader graph to have a swaying motion)
I originally thought some normals were facing the wrong way on my model, however I made sure all of them are correct and they face the right way.
I'm not exactly sure what the cause of this is but I assume it's on the unity end of things rather than blender because it looks fine in blender. Does anybody know how to fix this?
Answer by BalboaTheGreat · Mar 23 at 06:13 AM
I've found the solution somewhere among a few things I tried. I originally made the entire patch of leaves as 1 mesh, but I think that made it harder for unity to distinguish their true positions relative to eachother, since they all shared 1 'position'. What I did to fix it was 1. make each direction of leaves their own separate object in blender, totaling 4 objects, and 2. change their origin point in blender to a vertex further out, rather than all sharing an origin point at 0,0,0. I'm not sure which of the two changes fixed it, but one of those changes helped unity distinguish the actual positions of the leaves relative to each other and render them in a proper order.
Your answer
Follow this Question
Related Questions
Change Depth Range? 0 Answers
Purple lines appearing on models 0 Answers
MaterialPropertyBlock works with DrawMesh but not DrawMeshInstanced. 0 Answers
What's the order of events in Unity's rendering pipeline? 1 Answer
Simple Color Shader for 3D Models 0 Answers