Hello,
I am fairly new to Unity so bare with me please. I am creating randomly generated tilemap in 2d, I am trying to add ‘shadows’ (semi transparent texture) to my mountains. I have created each layer of mountains as MeshRenderers generating a large mesh in seperate layers. And a seperate MeshRenderer shadow for each on the layer below. I have the Sorting Order of these MeshRenderers exposed in the Editor and was using that to set their order. Using the shader I was originally using (Unlit/Transparent) the shadows overlapping each other become darker. (stacking semi transparent sprites).
So I read into creating a custom shader using a Stencil, with:
Stencil {
Ref 1
Comp NotEqual
Pass Replace
}
in place, its almost working, the shadows all join together rather than ‘overlapping’, but my sorting order for the seperate MeshRenderers are all on the bottom level. So the shadows are all entirely under my first level of mountains. See images! Hope this makes sense.
With default ‘Unlit/Transparent’ shader:

With my custom shader & stencil:

Thanks for any assistance in advanced!
