Somewhere to tamper the shadow
value, maybe. But it was just an idea.
When I enable PBRBlackShadowPluginMaterial and shadowGenerator enabled PCF at the same time, the ground receiving shadows will appear a lot of black pixels.
Is there any way to avoid it?
PG:https://playground.babylonjs.com/#IFYDRS#800
With PCF, you can have some values for aggShadow
which are close to 1 but not exactly 1 for lit pixels. You should test for a smaller value than 1 in the shader code, for eg. 0.99:
Hello,I tried what you said,the problem of black noise was solved, but a new problem appear.
When I enable PBRBlackShadowPluginMaterial,there will be a lot of black jagged edges on the top and sides of the model and ugly edges on the shadow edges.
Without PBRBlackShadowPluginMaterial:
With PBRBlackShadowPluginMaterial
The problem is that the value 0.99
depends on the scene. It seems that 0.9
will work better in your new scene. However, this is just a hack, so it will only work up to a point.
I have tried to modify the value 0.99 you mentioned. Although the problem is smaller, it still exists, and the corresponding value of different objects cannot be determined.
My actual application is in a large scene, there are many objects, no matter how to change this value can not reach an acceptable level.
Is there any other good way to solve this problem?
I donโt see any other way, except maybe by trying another filtering method than PCF / tweaking the bias value.
I see.If so, I probably canโt use this plugin because of the negative effects it had.
Thank you for your reply.