/// <inheritdoc/> protected override void CloneCore(Shadow source) { // Clone Shadow properties. base.CloneCore(source); // Clone CascadedShadow properties. var sourceTyped = (VarianceShadow)source; MinLightDistance = sourceTyped.MinLightDistance; MaxDistance = sourceTyped.MaxDistance; FadeOutRange = sourceTyped.FadeOutRange; ShadowFog = sourceTyped.ShadowFog; Filter = sourceTyped.Filter; IsLocked = sourceTyped.IsLocked; MinVariance = sourceTyped.MinVariance; LightBleedingReduction = sourceTyped.LightBleedingReduction; TargetArea = sourceTyped.TargetArea; // ShadowMap is not cloned! }
/// <inheritdoc/> protected override void CloneCore(Shadow source) { // Clone Shadow properties. base.CloneCore(source); // Clone StandardShadow properties. var sourceTyped = (StandardShadow)source; DefaultNear = sourceTyped.DefaultNear; DepthBias = sourceTyped.DepthBias; NormalOffset = sourceTyped.NormalOffset; NumberOfSamples = sourceTyped.NumberOfSamples; FilterRadius = sourceTyped.FilterRadius; JitterResolution = sourceTyped.JitterResolution; #pragma warning disable 618 DepthBiasScale = sourceTyped.DepthBiasScale; DepthBiasOffset = sourceTyped.DepthBiasOffset; #pragma warning restore 618 // ShadowMap is not cloned! }
protected virtual void CloneCore(Shadow source) { PreferredSize = source.PreferredSize; Prefer16Bit = source.Prefer16Bit; // ShadowMap, ShadowMask, ShadowMaskChannel are not cloned! }
/// <inheritdoc/> protected override void CloneCore(Shadow source) { // Clone Shadow properties. base.CloneCore(source); // Clone CascadedShadow properties. var sourceTyped = (CascadedShadow)source; NumberOfCascades = sourceTyped.NumberOfCascades; Distances = sourceTyped.Distances; MinLightDistance = sourceTyped.MinLightDistance; DepthBias = sourceTyped.DepthBias; NormalOffset = sourceTyped.NormalOffset; NumberOfSamples = sourceTyped.NumberOfSamples; FilterRadius = sourceTyped.FilterRadius; JitterResolution = sourceTyped.JitterResolution; FadeOutRange = sourceTyped.FadeOutRange; ShadowFog = sourceTyped.ShadowFog; CascadeSelection = sourceTyped.CascadeSelection; VisualizeCascades = sourceTyped.VisualizeCascades; IsCascadeLocked[0] = sourceTyped.IsCascadeLocked[0]; IsCascadeLocked[1] = sourceTyped.IsCascadeLocked[1]; IsCascadeLocked[2] = sourceTyped.IsCascadeLocked[2]; IsCascadeLocked[3] = sourceTyped.IsCascadeLocked[3]; #pragma warning disable 618 SplitDistribution = sourceTyped.SplitDistribution; FadeOutDistance = sourceTyped.FadeOutDistance; MaxDistance = sourceTyped.MaxDistance; DepthBiasScale = sourceTyped.DepthBiasScale; DepthBiasOffset = sourceTyped.DepthBiasOffset; #pragma warning restore 618 // ShadowMap is not cloned! }