Class ColorMaterial
A material that doesn't get any lighting applied.
class Microsoft::Azure::RemoteRendering::ColorMaterial final : public Microsoft::Azure::RemoteRendering::Material
Properties
AlbedoColor
Constant albedo color.
This color is modulated with the color from the ColorMaterial.AlbedoTexture. The alpha channel represents the opacity, in case the material is flagged as transparent (ColorMaterial.ColorTransparencyMode). Can be set to the same allowed value range as for PbrMaterial.AlbedoColor but will be clamped to [0;1] during rendering.
auto GetAlbedoColor() const noexcept -> Microsoft::Azure::RemoteRendering::Color4;
auto SetAlbedoColor(Microsoft::Azure::RemoteRendering::Color4 const& value) noexcept -> Microsoft::Azure::RemoteRendering::Status;
AlbedoTexture
The Texture used for the albedo color. Pass in null
if no dedicated texture is needed.
A Result.InvalidType error occurs if a texture is set that is not a 2D texture.
auto GetAlbedoTexture() const noexcept -> ApiHandle<Microsoft::Azure::RemoteRendering::Texture>;
auto SetAlbedoTexture(ApiHandle<Microsoft::Azure::RemoteRendering::Texture> const& value) noexcept -> Microsoft::Azure::RemoteRendering::Status;
AlphaClipThreshold
Threshold that is used for alpha cutouts.
If a pixel's final alpha value [0..1] falls below this threshold, the pixel is clipped, creating a hard cutout. Note that the material's PbrMaterialFeatures.AlphaClipped flag has to be set, for this threshold to have an effect.
A Result.InvalidParam error occurs if the value is outside [0..1] range.
auto GetAlphaClipThreshold() const noexcept -> float;
auto SetAlphaClipThreshold(float value) noexcept -> Microsoft::Azure::RemoteRendering::Status;
ColorFlags
The color material flags.
A Result.InvalidParam error occurs if an invalid bitmask is passed in.
auto GetColorFlags() const noexcept -> Microsoft::Azure::RemoteRendering::ColorMaterialFeatures;
auto SetColorFlags(Microsoft::Azure::RemoteRendering::ColorMaterialFeatures value) noexcept -> Microsoft::Azure::RemoteRendering::Status;
ColorTransparencyMode
Transparency mode for this material. See ColorTransparencyMode for details.
A Result.InvalidParam error occurs if an invalid mode is passed in.
auto GetColorTransparencyMode() const noexcept -> Microsoft::Azure::RemoteRendering::ColorTransparencyMode;
auto SetColorTransparencyMode(Microsoft::Azure::RemoteRendering::ColorTransparencyMode value) noexcept -> Microsoft::Azure::RemoteRendering::Status;
FadeOut
Fade-out value in the [0..1] range, where 0.0 means fully faded out and 1.0 means fully opaque.
This is very similar to changing the albedo's alpha on a transparent material, however, this function automatically manages the transparency flag for values of 1.0 (fully opaque) and smaller than 1.0 (semi-transparent).
A Result.InvalidParam error occurs if the value is outside [0..1] range.
auto GetFadeOut() const noexcept -> float;
auto SetFadeOut(float value) noexcept -> Microsoft::Azure::RemoteRendering::Status;
FresnelEffectColor
The Fresnel effect color used when the effect is enabled (see the 'FresnelEffect' flag in ColorMaterialFeatures)
Only the rgb channels of the color are used for the Fresnel effect, while the alpha value will be ignored. Can be set to the same allowed value range as for PbrMaterial.FresnelEffectColor but will be clamped to [0;1] during rendering.
auto GetFresnelEffectColor() const noexcept -> Microsoft::Azure::RemoteRendering::Color4;
auto SetFresnelEffectColor(Microsoft::Azure::RemoteRendering::Color4 const& value) noexcept -> Microsoft::Azure::RemoteRendering::Status;
FresnelEffectExponent
The Fresnel effect exponent used when the effect is enabled (see the 'FresnelEffect' flag in ColorMaterialFeatures)
The valid range for the exponent is [0.01, 10].
auto GetFresnelEffectExponent() const noexcept -> float;
auto SetFresnelEffectExponent(float value) noexcept -> Microsoft::Azure::RemoteRendering::Status;
TexCoordMode
Defines the mode that is used to produce texture coordinates for the albedo texture. This mode is ignored if this material does not use a texture. See TextureCoordinateGenerationMode for the supported modes.
auto GetTexCoordMode() const noexcept -> Microsoft::Azure::RemoteRendering::TextureCoordinateGenerationMode;
auto SetTexCoordMode(Microsoft::Azure::RemoteRendering::TextureCoordinateGenerationMode value) noexcept -> Microsoft::Azure::RemoteRendering::Status;
TexCoordOffset
Constant offset added to texture input Uv coordinates.
An offset is normalized to [0..1] range, regardless of texture size, so (0.5, 0.5) always points to the middle of a texture. The offset can be changed over time to scroll the texture.
A Result.InvalidParam error occurs if the value is NaN or infinite.
auto GetTexCoordOffset() const noexcept -> Microsoft::Azure::RemoteRendering::Float2;
auto SetTexCoordOffset(Microsoft::Azure::RemoteRendering::Float2 const& value) noexcept -> Microsoft::Azure::RemoteRendering::Status;
TexCoordPlaneU
The plane that is used to calculate the u-portion of the texture coordinates in either TextureCoordinateGenerationMode.PlanarObjectSpace or TextureCoordinateGenerationMode.PlanarWorldSpace mode.
This plane is ignored for texture coordinate generation modes TextureCoordinateGenerationMode.SourceUv0 and TextureCoordinateGenerationMode.SourceUv1. Scaling of the mapping is achieved by scaling the plane's normal (A, B and C), and a texture offset can be added through the plane's D component.
auto GetTexCoordPlaneU() const noexcept -> Microsoft::Azure::RemoteRendering::Plane;
auto SetTexCoordPlaneU(Microsoft::Azure::RemoteRendering::Plane const& value) noexcept -> Microsoft::Azure::RemoteRendering::Status;
TexCoordPlaneV
The plane that is used to calculate the v-portion of the texture coordinates in either TextureCoordinateGenerationMode.PlanarObjectSpace or TextureCoordinateGenerationMode.PlanarWorldSpace mode.
This plane is ignored for texture coordinate generation modes TextureCoordinateGenerationMode.SourceUv0 and TextureCoordinateGenerationMode.SourceUv1. Scaling of the mapping is achieved by scaling the plane's normal (A, B and C), and a texture offset can be added through the plane's D component.
auto GetTexCoordPlaneV() const noexcept -> Microsoft::Azure::RemoteRendering::Plane;
auto SetTexCoordPlaneV(Microsoft::Azure::RemoteRendering::Plane const& value) noexcept -> Microsoft::Azure::RemoteRendering::Status;
TexCoordScale
Scaling factors for texture input Uv coordinates.
Used to repeat/tile textures. For instance passing (4, 2) will repeat the texture 4 times along the U texture coordinate, and 2 times along V.
A Result.InvalidParam error occurs if the value is NaN or infinite.
auto GetTexCoordScale() const noexcept -> Microsoft::Azure::RemoteRendering::Float2;
auto SetTexCoordScale(Microsoft::Azure::RemoteRendering::Float2 const& value) noexcept -> Microsoft::Azure::RemoteRendering::Status;
See also
VertexMix
How much the vertex color is mixed into the final color. In [0..1] range.
If the mesh has vertex colors, those colors can be multiplied into the final color. This option defines how much influence the vertex colors will have. A value of 0.0 means that the vertex color doesn't contribute to the output at all. At 1.0 the vertex colors are fully multiplied into the albedo color.
A Result.InvalidParam error occurs if the value is outside [0..1] range.
auto GetVertexMix() const noexcept -> float;
auto SetVertexMix(float value) noexcept -> Microsoft::Azure::RemoteRendering::Status;