#[repr(transparent)]pub struct SCNShadowMode(pub NSInteger);SCNLight only.Expand description
The different modes available to compute shadows.
When the shadow mode is set to SCNShadowModeForward, shadows are computed while computing the lighting. In this mode only the alpha component of the shadow color is used to alter the lighting contribution. When the shadow mode is set to SCNShadowModeDeferred shadows are applied as a post process. Shadows are blend over the final image and can therefor be of any arbitrary color. However it is most of the time less efficient than SCNShadowModeForward, except when a scene has a lot of overdraw. When the shadow mode is set to SCNShadowModeModulated the light doesn’t illuminate the scene anymore, it only casts shadows. Therefore setting the light color has no effect. In this mode gobos act as a shadow projector: the gobo image is modulated with the shadow receiver’s fragments. The typical usage is to use an image of a radial gradient (black to white) that is projected under a character (and use the categoryBitMask of the light and nodes to exclude the character from the shadow receiver).
See also Apple’s documentation
Tuple Fields§
§0: NSIntegerImplementations§
Trait Implementations§
Source§impl Clone for SCNShadowMode
impl Clone for SCNShadowMode
Source§fn clone(&self) -> SCNShadowMode
fn clone(&self) -> SCNShadowMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more