[]
        
(Showing Draft Content)

C1.Util.DX.Direct2D.Effects.DistantSpecular

DistantSpecular Class

Builtin DistantSpecular effect.

Inheritance
DistantSpecular
Implements
Namespace: C1.Util.DX.Direct2D.Effects
Assembly: C1.Win.C1DX.4.8.dll
Syntax
public class DistantSpecular : Effect, IDisposable, IUnknown

Constructors

Name Description
DistantSpecular(IntPtr)

Initializes a new instance of the DistantSpecular class.

Properties

Name Description
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.

Color

The color of the incoming light. This property is exposed as a Vector3 – (R, G, B) and used to compute LR, LG, LB.

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.

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 Vector2 (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. If you don't select a mode, the effect uses the interpolation mode of the device context. See Scale modes for more info.

SpecularConstant

The ratio of specular reflection to the incoming light. The value is unitless and must be between 0 and 10,000.

SpecularExponent

The exponent for the specular term in the Phong lighting equation. A larger value corresponds to a more reflective surface. The value is unitless and must be between 1.0 and 128.

SurfaceScale

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

Methods

Name Description
Create(DeviceContext)

Initializes a new instance of DistantSpecular effect.