- Home /
Hard shadows and AA causing white pixel artifacts on ALL meshes
Hard shadows with AA enabled seem to cause a white pixel border artifact to be rendered around my model. See image for clarification:
http://i.imgur.com/Uc1LmbX.jpg
you can see the problem clearly, when the model is in the light but rendered over a cast shadow the white border appears, but when it is rendered fully in the light or shadow it is not apparent.
It is not my material settings, as you can see it also happens with this default sphere:
(it isn't the plane below it causing the problem either, I tried it with a default plane beneath it in an empty scene as well.)
And finally here is a picture with and without AA enabled:
http://i.imgur.com/fHpTWQU.jpg
If anybody could shed some light on the issue (hah) it would be much appreciated!
Answer by AM_1 · Jun 25, 2014 at 01:49 PM
This question is old, I know, but no one has answered it, so I'll do it.
Shadows are rendered after all the inbuilt antialiasing calculations are finished, which means that when Unity renders a frame, it first renders all objects without shadows or effects. Then it antialiases the result, so the non-shadowed ground is blurred together with the objects. Finally, Unity adds shadows.
Render Objects -> Antialias them with light pixels -> Darken the background with shadows
The problem is, you have some of the non-shadowed light ground pixel on top of the shadowed ones. So basically, the "white pixel" artifacts you are seeing is just your ground peeking through the shadows.
Solution:
If you're using Unity Pro, you can use this antialiasing method instead of the default, or you could use the in-built Unity Pro Edge Blur Effect.
If you're using Free, you could spend a lot of time and game performance doing this: Recreating Unity Pro effects in Unity Free (see the part about RenderTextures
) and use FXAA3 antialiasing with that. Other that that you'll just have to change your quality settings on Unity Free.
Hope it helped!
I knew this was not a bug and boils down to mysterious headaches if one does not own unity pro. I have flickering shadows and aa issues hitting the roof on the most simple scene of a model sitting on a couch. Considering it is now 2017 and the problem persists, I question what is the reason it is not fixed. No solution has worked so far.
Your answer
Follow this Question
Related Questions
Black stripes shadows 4 Answers
Why are the shadows glitching 0 Answers
RealTime Shadows with terrain painted trees 1 Answer
Shadow Issues, Light going through walls slightly 3 Answers
Lights rendering Shadow Artifacts? 0 Answers