I tried googling and found no answer to what I should do, well maybe I just searched using wrong terms or something… But in my case I got nothing.
Though I did find a post somewhere that mentioned using invisible mesh to only cast shadows. Don’t know if that’s the only way and if it would even work, but that’s just what I’ve heard.
I will edit the post and show more settings if needed, but hopefully this is enough and someone knows how to get rid of this.
Yes, lowering the bias makes the leak smaller on the seams, but it also creates other artifacts in shadows.
There isn’t really much you can do here using the shadowmap system that’s part of the built-in renderer. Biasing is still a huge problem in the world of rendering, and most workarounds create other issues (like the normal bias you see here).
If you wanted to use normal bias without edge seams, you would need a second version of the mesh with a continuous surface (i.e. joining all vertices/triangles) set to render shadows only. That way, the normals will connect and the individual triangles won’t separate during the shadow bias step. I try to avoid normal bias altogether because it does strange things with most non-uniform meshes, however that still leaves you with the problem of regular bias seams.
The only real ‘fix’ for that would be to use an additional contact shadows image effect to mask the edges properly. This works pretty flawlessly, but they aren’t straightforward to implement, and most third party implementations aren’t free. Here’s an example Keijiro Takahashi made however;
An alternative approach would be to use a mesh with shared vertices and don’t use vertex normals at all. If your target hardware supports the ddx / ddy function you can calculate the surface normal inside the fragment shader with the partial derivative functions ddx and ddy:
// in the cg fragment shader
float3 x = ddx(IN.pos); // IN.pos is the screen space vertex position
float3 y = ddy(IN.pos);
float3 normal = normalize(cross(x, y));
However it depends on what kind of shader(s) and advanced features you want to use if such a custom shader fits into your rendering pipeline.