Class AlphaVideoMaterial

Inheritance Relationships

Base Type

Class Documentation

class AlphaVideoMaterial : public csp::systems::Material

Data class which represents an Alpha Video material.

Public Functions

void SetColorTexture(const TextureInfo &Texture)

Sets the color texture.

The first three components (RGB) MUST be encoded with the sRGB transfer function. They specify the color of the material. If the fourth component (A) is present, it represents the linear alpha coverage of the material. Otherwise, the alpha coverage is equal to 1.0. The material.blendMode property defines how the alpha is blended when alphaMode is set to BLEND. The material.readAlphaFromChannel property defines which color channel to read the alpha values from. The stored texels MUST NOT be premultiplied.

Parameters

Texture – const TextureInfo& : The material color texture.

Pre

If the fourth component (A) is undefined, the texture MUST be sampled as having 1.0 in all components.

const TextureInfo &GetColorTexture() const

Gets the color texture.

Returns

const TextureInfo& : The material color texture.

void SetDoubleSided(bool DoubleSided)

Sets the doubleSided property which specifies whether the material is double sided.

When this value is false, back-face culling is enabled, i.e., only front-facing triangles are rendered. When this value is true, back-face culling is disabled and double sided lighting is enabled.

Parameters

DoubleSided – bool : The double sided value.

bool GetDoubleSided() const

Gets the double sided value.

Returns

bool : The double sided value.

void SetIsEmissive(bool IsEmissive)

Sets whether the material is emissive, if not material should be lit by the scene lighting.

Parameters

IsEmissive – bool : The emissive value.

bool GetIsEmissive() const

Gets whether the material is emissive, if not material should be lit by the scene lighting.

Returns

bool

void SetReadAlphaFromChannel(EColorChannel ColorChannel)

Sets the color channel to read the alpha values from.

Parameters

ColorChannelEColorChannel : The color channel to read the alpha values from.

EColorChannel GetReadAlphaFromChannel() const

Gets the color channel to read the alpha values from.

Returns

EColorChannel : The color channel to read the alpha values from.

void SetBlendMode(EBlendMode Mode)

Sets the mode to use for alpha blending.

Parameters

ModeEBlendMode : The mode to use for alpha blending.

EBlendMode GetBlendMode() const

Gets the alpha blend mode.

Returns

EBlendMode : The alpha blend mode.

void SetFresnelFactor(float Factor)

Sets the fresnel factor.

Parameters

Factor – float : The fresnel factor.

float GetFresnelFactor() const

Gets the fresnel factor.

Returns

float : The fresnel factor.

void SetTint(const csp::common::Vector3 &Tint)

Set the Material tint.

Parameters

Tint – const csp::common::Vector3& : The tint value.

const csp::common::Vector3 &GetTint() const

Get the Material tint.

Returns

const csp::common::Vector3& GetTint() : The tint value.

void SetAlphaFactor(float Factor)

Set the alpha factor.

Parameters

Factor – float : The alpha factor.

float GetAlphaFactor() const

Get the alpha factor.

Returns

float : The alpha factor.

void SetEmissiveIntensity(float Intensity)

Set the emissive intensity.

Parameters

Intensity – float : The emissive intensity.

float GetEmissiveIntensity() const

Get the emissive intensity.

Returns

float : The emissive intensity.

void SetAlphaMask(float Mask)

Set the alpha mask.

Parameters

Mask – float : The alpha mask.

float GetAlphaMask() const

Get the alpha mask.

Returns

float : The alpha mask.

AlphaVideoMaterial(const csp::common::String &Name, const csp::common::String &MaterialCollectionId, const csp::common::String &MaterialId)

Constructor which links the material to an asset.

Parameters
virtual ~AlphaVideoMaterial() = default
AlphaVideoMaterial()