Click or drag to resize
AB4D logo

WpfMaterial Properties

The WpfMaterial type exposes the following members.

Properties
 NameDescription
Public propertyAlpha Gets a float value that defines the alpha value for the material.
Public propertyAlphaClipThreshold Pixels with alpha color values below this value will be clipped (not rendered and their depth will not be written to depth buffer). Expected values are between 0 and 1. When 0 (by default) then alpha clipping is disabled - this means that also pixels with alpha value 0 are fully processed (they are not visible but its depth value is still written so objects that are rendered afterwards and are behind the pixel will not be visible).
Public propertyAmbientColor Gets a Color3 that specifies an color that defines how much ambient color is reflected by this material.
Public propertyCachedConstantBuffers Gets or sets an array of DirectX Constant buffers that can be created for this instance of Material. The buffers can be created in Effects and can be reused for multiple frames when the material is not changed.
Public propertyConstantBuffersVersion Gets or sets a version that was read from Material's Version at the time of creating the CachedConstantBuffers
Public propertyDiffuseColor Gets a Color3 that specifies the diffuse color of this material.
Public propertyDiffuseTextures Gets an array of ShaderResourceView that define the textures.
Public propertyEmissiveColor Gets a Color3 that that represents the emissive color - the color of the object regardless of the lights.
Public propertyEnvironmentalCubeMap Gets ShaderResourceView that defines the EnvironmentalCubeMap. ShaderResourceView should define a cube map with 6 textures for each side of the cube.
Public propertyHasImageInvertedYTransformation If true then the texture image has a transformation that flips the texture vertically. This property is used by DXEngine to optimize the rendering of a texture.
Public propertyHasOnlyEmissiveColor Gets a Boolean that specifies if this material has only emissive color. If false than other material properties are also defined.
Public propertyHasSpecularColor Gets a boolean that specifies if specular material is used by the WpfMaterial
Public propertyHasTransparency Gets a boolean that specifies if this material is semi-transparent and needs to be alpha blended with the scene.
Public propertyIsDirty Gets or sets a Boolean that specifies if the properties of the used WPF material have changed and we need to call UpdateMaterial method to update the properties of this material.
Public propertyIsPreMultipliedAlphaColor When IsPreMultipliedAlphaColor is true (false by default) and Alpha is less then 1, then the color components of the DiffuseColor are multiplied with alpha value to produce pre-multiplied alpha colors. When false, then non-pre-multiplied color is converted to pre-multiplied color when this is required by the shader.
Public propertyIsRenderToBitmapRequired Gets a Boolean that specifies if this material is a complex material (VisualBrush, Gradient, DrawingImage, etc.) and require calling RenderToBitmap method to get a bitmap that will be used as a texture. This property is false for solid color materials and materials with BitmapImages.
Public propertyIsTwoSided Gets a Boolean that specifies if the material should be rendered on both front and back side.
Public propertyMaterial Gets a WPF Material that is used by this WpfMaterial object instance.
Public propertyReflectionFactor Gets reflection factor from 0 to 1 that is used when ReflectionMap is null. Values 1 means full reflection (only enviromental map will be shown) and 0 means that only diffuse material without environmental map is shown.
Public propertyReflectionMap Gets ShaderResourceView that defines the reflection map where white colors mean fully reflective image and black colors mean no reflection (fully diffuse).
Public propertyRenderedBrushTextureHeight When set to a value bigger than 0, than this property defines the height of the RenderTargetBitmap that is created when a VisualBrush, GradientBrush (LinearGradientBrush or RadialGradientBrush) or DrawingImage is rendered into texture that is used in DXEngine. When value is 0 or less then the DefaultVisualBrushTextureSize or DefaultGradientBrushTextureSize is used (in case of rendering DrawingImage this value can be 0 and if RenderedBrushTextureWidth is set, the height will be calculate to preserve the aspect ratio). This value can be also set with using the SetDXAttribute(Material, DXAttributeType, Object) method on WPF's material with CachedBitmapSize attribute.
Public propertyRenderedBrushTextureWidth When set to a value bigger than 0, than this property defines the width of the RenderTargetBitmap that is created when a VisualBrush, GradientBrush (LinearGradientBrush or RadialGradientBrush) or DrawingImage is rendered into texture that is used in DXEngine. When value is 0 or less then the DefaultVisualBrushTextureSize or DefaultGradientBrushTextureSize is used (in case of rendering DrawingImage this value can be 0 and if RenderedBrushTextureHeight is set, the width will be calculate to preserve the aspect ratio). This value can be also set with using the SetDXAttribute(Material, DXAttributeType, Object) method on WPF's material with CachedBitmapSize attribute.
Public propertyRenderToBitmapOnEveryFrame Gets or sets a Boolean that can be specifies to true to render the material to bitmap on each rendered frame (used only in case of VisualBrush, GradientBrush or DrawingImage). This can be used to render animating VisualBrush. Use this property with caution because it can greatly decrease performance. In this case it is recommended to lower the resolution of the rendered bitmap with setting the RenderedBrushTextureWidth or RenderedBrushTextureHeight or using CachedBitmapSize DXAttribute.
Public propertySamplerStates Gets an array of SamplerState that define the state of the samplers.
Public propertySpecularColor Gets the Color3 that specifies the color used to draw the specular highlight effect.
Public propertySpecularPower Gets a float that specifies the power of the specular effect. Zero values means that the specular effect is turned off.
Public propertyTextureBlendState Gets a BlendState that is used to render the texture. If null a CommonStates.Opaque will be used.
Public propertyTextureCoordinatesBounds TextureCoordinatesBounds contains the bounding value of the mesh's texture coordinates - needed when drawing texture and texture coordinates size is not 1.
Public propertyTextureResourceName Gets a string that can be used to specify the name of the texture - this can be a the file name of the texture file.
Top
See Also