I add one node and try to setting shadow blur with SceneKit
here's my light config, I did try to set shadowRadius
light = [SCNLight light];
light.type = SCNLightTypeDirectional;
light.castsShadow = true;
light.shadowMode = SCNShadowModeForward;
light.shadowRadius = 5;
light.shadowMapSize=CGSizeMake(4000, 4000);
light.orthographicScale=25;
light.zNear=1;
light.zFar=1000;
but the result is not softer than when I not set shadowRadius
it' here:
I did try to add samplecount
light = [SCNLight light];
light.type = SCNLightTypeDirectional;
light.castsShadow = true;
light.shadowMode = SCNShadowModeForward;
light.shadowRadius = 5;
// add samplecount
light.shadowSampleCount = 5;
light.shadowMapSize=CGSizeMake(4000, 4000);
light.orthographicScale=25;
light.zNear=1;
light.zFar=1000;
shadow seem soft but this shadow start from bottom of the node (z coordinate is 0). I spend a lot of time to set soft shadow only in the edge of node, not from bottom. But no result.
This problem also occurred when add two node cross over(not only node and geometry as SCNFloor)
My problem is how to get shadow blur(soft shadow) with direction light.
any help would be appreciated!
automaticallyAdjustsShadowProjection
property mentioned below is still not even documented. – StephenT