Colored "jaggies" when I turn on aliasing on shadowed surfaces

I get these weird edge jagged artifacts if I turn on shadows and they seem to have the color of the thing behind it, but if I either set cast shadows or receive shadows to false then they go away. This seems to happen on every model I’ve tried to use (including the built in cube)

Things that fix it include:

  • Turn casting shadows to false
  • Turn receiving shadows to false
  • Turn off anti-aliasing

None of the previous answers to this question seem to apply because there is no transparency and the problem persists if I turn mipmaps off. In fact, the problem still exists even if the model has no texture.

Any help would be great thanks.

That maaay be self-shadowing, which is caused by the depth difference being slightly off, so it thinks it’s in front of itself. If self-shadowing is on, this is the culprit. In straight GL code, there’s a self shadowing offset in order to correct for this inaccuracy. It also makes sense given that turning either recieving or casting shadows would effectively turn off self-shadowing.

Not sure this applies or helps, but just food for thought…