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).

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.

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;

TexCoordOffset

Constant offset added to texture 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;

TexCoordScale

Scaling factors for texture 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;

See also