shadowSoft2D
shadowSoft2D(
position,lightPos,occluderTex,occluderSize,lightRadius?,shadowStrength?):Node<"float">
Defined in: packages/nodes/src/lighting/shadows.ts:157
Calculate soft 2D shadow with penumbra. Samples multiple rays for a softer shadow edge.
Parameters
Section titled “Parameters”position
Section titled “position”World/screen position of the surface
lightPos
Section titled “lightPos”Position of the light source
occluderTex
Section titled “occluderTex”Texture containing occluder data
occluderSize
Section titled “occluderSize”Size of the occluder texture in world units
lightRadius?
Section titled “lightRadius?”FloatInput = 10
Radius of the light source for soft shadows
shadowStrength?
Section titled “shadowStrength?”FloatInput = 0.7
Shadow intensity
Returns
Section titled “Returns”Node <"float">
Soft shadow factor