Table of Contents

Class DistantDiffuseEffect.Props

Namespace
PaintDotNet.Direct2D1.Effects
Assembly
PaintDotNet.Windows.Core.dll
public sealed class DistantDiffuseEffect.Props : DeviceEffectProperties
Inheritance
DistantDiffuseEffect.Props
Inherited Members

Constructors

Props()

Properties

Azimuth

The direction angle of the light source in the XY plane relative to the X-axis in the counter clock wise direction. The units are in degrees and must be between 0 and 360 degrees. The default value is 0.

ClassID

Implemented by the derived class to specify the effect's class ID (CLSID) when registering and creating the effect and for binding to an IDeviceEffectProperties.
Note that this is different than the ID property accessor, which queries the IDeviceEffectProperties for the actual runtime effect class ID.
Overriding this property is only necessary in advanced scenarios, such as when wrapping an existing effect (e.g. built-in Direct2D effects), or when working with CustomEffects that have their own generic type arguments (e.g. PixelShaderEffect).

Color

The color of the incoming light. This property is exposed as a D2D1_VECTOR_3F (R, G, B) and used to compute L[r], L[g], L[b]. The default value is { 1, 1, 1 }.

DiffuseConstant

The ratio of diffuse reflection to amount of incoming light. This property must be between 0 and 10,000 and is unitless. The default value is 1.

Elevation

The direction angle of the light source in the YZ plane relative to the Y-axis in the counter clock wise direction. The units are in degrees and must be between 0 and 360 degrees. The default value is 0.

Input
KernelUnitLength

The size of an element in the Sobel kernel used to generate the surface normal in the X and Y direction. This property maps to the dx and dy values in the Sobel gradient. This property is a Vector2Float (Kernel Unit Length X, Kernel Unit Length Y) and is defined in (device-independent pixels (DIPs)/Kernel Unit). The effect uses bilinear interpolation to scale the bitmap to match size of kernel elements.

ScaleMode

The interpolation mode the effect uses to scale the image to the corresponding kernel unit length. There are six scale modes that range in quality and speed. The default value is DistantDiffuseScaleMode.Linear.

SurfaceScale

The scale factor in the Z direction. The surface scale is unitless and must be between 0 and 10,000. The default value is 1.