RaycasterSettings

References
public sealed class RaycasterSettings
Class for collecting all properties needed during a raycasting process.

Constructors

RaycasterSettings

#
public RaycasterSettings(int min = 8, int max = 64, float vitality = 1E-06, int longevity = 8)
Create new Raycasting settings.
min (int = 8)Minimum samples per pixel. Usually 1 unless you want to sample the living daylights out of an entire image.
max (int = 64)Maximum samples per pixel. 32/64 is a good maximum for regular shapes+shaders. Higher values may be needed for noisy shaders.
vitality (float = 1E-06)Vitality threshold. The amount of change to a pixel colour for each iteration above which the pixel is considered alive.
longevity (int = 8)Longevity iterations. Higher numbers will keep pixels alive for longer, even if they no longer seem vital.

Properties

Longevity

#
public int Longevity { get; set; }
Gets or sets the minimum amount of sampling iterations required after a measurable change before a pixel can be considered fixed.

MaximumSamples

#
public int MaximumSamples { get; set; }
Gets or sets the maximum samples per pixel. 32 to 64 yield high quality anti-aliasing, but for noisy shaders or thin geometry (anything generating moire patterns) higher values may be called for. 1000 samples is usually overkill, but up to 5000 samples are allowed per pixel.

MinimumSamples

#
public int MinimumSamples { get; set; }
Gets or sets the minimum samples per pixel.

PassCompleted

#
public Action<Raycaster, RaycasterSettings, CancellationToken> PassCompleted { get; set; }
Gets or sets the delegate to be called when a new sampling pass completes. This property may be set only once.

ProcessCompleted

#
public Action<Raycaster, RaycasterSettings> ProcessCompleted { get; set; }
Gets or sets the delegate to be called when the total raycasting process completes. This property may be set only once.

SubsamplingResolutions

#
public int[] SubsamplingResolutions { get; set; }
Gets or sets the coarse samples to compute prior to the actual progressive raycasting process.

Vitality

#
public float Vitality { get; set; }
Gets or sets the threshold below which the accumulated difference between the prior and assigned colour of a pixel is considered 'unchanging'. Pixels that chance insufficiently over various iterations will be moved from the live to the dead list and no longer evaluated. 1e-4 may work for images with very low noise levels, 1e-6 will keep pixels alive longer for higher quality results.