Skip to content

ludus::content::scene_format::MaterialRecordV6

Ludus Wiki · API overview · Browse API

Struct

Version 6 material: version 5 terms plus texture-modulated surface detail. SurfaceTexture is linear data, never colour: RG encode the tangent-space normal XY as 2 * channel - 1 (positive Z reconstructed, +Y along the vertex bitangent cross(Normal, Tangent.xyz) * Tangent.w), B multiplies Roughness (floored at MIN_ROUGHNESS) and A multiplies Metallic. EmissionTexture is sRGB colour whose RGB multiplies Emission. Both share Texture's coordinates and address mode. A texture referenced as a surface map must not also be a base or emission texture.

Declared in modules/content/scene_format/include/ludus/content/scene_format/luscn.h

#include <ludus/content/scene_format/luscn.h>
struct ludus::content::scene_format::MaterialRecordV6 final

Fields

Texture

uint32 ludus::content::scene_format::MaterialRecordV6::Texture
sRGB base colour texture index or NO_TEXTURE.

Related types: uint32

Declared in modules/content/scene_format/include/ludus/content/scene_format/luscn.h

AddressMode

uint32 ludus::content::scene_format::MaterialRecordV6::AddressMode
ADDRESS_CLAMP or ADDRESS_REPEAT.

Related types: uint32

Declared in modules/content/scene_format/include/ludus/content/scene_format/luscn.h

Metallic

float32 ludus::content::scene_format::MaterialRecordV6::Metallic
[0, 1].

Related types: float32

Declared in modules/content/scene_format/include/ludus/content/scene_format/luscn.h

Roughness

float32 ludus::content::scene_format::MaterialRecordV6::Roughness
[MIN_ROUGHNESS, 1].

Related types: float32

Declared in modules/content/scene_format/include/ludus/content/scene_format/luscn.h

Emission

float32 ludus::content::scene_format::MaterialRecordV6::Emission[RGB_CHANNELS][RGB_CHANNELS]
Nonnegative linear Rec.709 RGB, at most MAX_EMISSION.

Related types: float32

Declared in modules/content/scene_format/include/ludus/content/scene_format/luscn.h

EmissionFlags

uint32 ludus::content::scene_format::MaterialRecordV6::EmissionFlags
EMISSION_TWO_SIDED and/or EMISSION_HAS_POWER.

Related types: uint32

Declared in modules/content/scene_format/include/ludus/content/scene_format/luscn.h

AreaSourceId

uint64 ludus::content::scene_format::MaterialRecordV6::AreaSourceId
Nonzero for emissive surfaces; zero for nonemitters.

Related types: uint64

Declared in modules/content/scene_format/include/ludus/content/scene_format/luscn.h

EmissionPower

float32 ludus::content::scene_format::MaterialRecordV6::EmissionPower
Lumens after authoring scale; zero without HAS_POWER.

Related types: float32

Declared in modules/content/scene_format/include/ludus/content/scene_format/luscn.h

AlphaMode

uint32 ludus::content::scene_format::MaterialRecordV6::AlphaMode
ALPHA_OPAQUE or ALPHA_MASKED.

Related types: uint32

Declared in modules/content/scene_format/include/ludus/content/scene_format/luscn.h

AlphaCutoff

float32 ludus::content::scene_format::MaterialRecordV6::AlphaCutoff
Masked threshold in [0, 1]; zero for ALPHA_OPAQUE.

Related types: float32

Declared in modules/content/scene_format/include/ludus/content/scene_format/luscn.h

SurfaceTexture

uint32 ludus::content::scene_format::MaterialRecordV6::SurfaceTexture
Linear surface map index or NO_TEXTURE.

Related types: uint32

Declared in modules/content/scene_format/include/ludus/content/scene_format/luscn.h

EmissionTexture

uint32 ludus::content::scene_format::MaterialRecordV6::EmissionTexture
sRGB emission colour index or NO_TEXTURE.

Related types: uint32

Declared in modules/content/scene_format/include/ludus/content/scene_format/luscn.h

NormalScale

float32 ludus::content::scene_format::MaterialRecordV6::NormalScale
Tangent-normal strength in [0, MAX_NORMAL_SCALE]; zero without a surface map.

Related types: float32

Declared in modules/content/scene_format/include/ludus/content/scene_format/luscn.h