LuciadCPillar 2026.1.02
Loading...
Searching...
No Matches
luciad::PbrShadingModel Class Referencefinal

Shading model that applies physically based rendering (PBR) to a mesh. More...

#include <luciad/layers/styles/ShadingModel.h>

Inheritance diagram for luciad::PbrShadingModel:
luciad::ShadingModel

Classes

class  Builder
 Builder for a luciad::PbrShadingModel. More...

Public Member Functions

 ~PbrShadingModel () override
Builder asBuilder () const
 Creates a builder pre-filled with this shading model's parameters.
double getLightIntensity () const
 Returns the light intensity used for the PBR lighting, a linear multiplier on the resulting shading.
double getMetallicFactor () const
 Returns the metallic factor applied to PBR materials.
double getMetallicOffset () const
 Returns the metallic offset applied to PBR materials.
double getRoughnessFactor () const
 Returns the roughness factor applied to PBR materials.
double getRoughnessOffset () const
 Returns the roughness offset applied to PBR materials.
bool isDirectionalLightingEnabled () const
 Returns whether PBR shading includes directional lighting.
bool isIgnoreUnlitPropertyEnabled () const
 Returns whether a material's unlit property is ignored so that PBR shading is still applied to it.
bool isImageBasedLightingEnabled () const
 Returns whether PBR shading includes image-based lighting (IBL).
Public Member Functions inherited from luciad::ShadingModel
 ShadingModel (const ShadingModel &)=delete
virtual ~ShadingModel ()=default
ShadingModel & operator= (const ShadingModel &)=delete

Static Public Member Functions

static Builder newBuilder ()
 Creates a new builder with the default PBR parameters.

Additional Inherited Members

Protected Member Functions inherited from luciad::ShadingModel
 ShadingModel ()=default
 Default constructor.

Detailed Description

Shading model that applies physically based rendering (PBR) to a mesh.

This is the default shading model. It shades PBR assets, such as glTF metallic-roughness materials (see https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#metallic-roughness-material), using the map's light (see luciad::LightEffect) and environment map (see luciad::EnvironmentMapEffect).

Since
2026.1

Constructor & Destructor Documentation

◆ ~PbrShadingModel()

luciad::PbrShadingModel::~PbrShadingModel ( )
override

Member Function Documentation

◆ asBuilder()

Builder luciad::PbrShadingModel::asBuilder ( ) const

Creates a builder pre-filled with this shading model's parameters.

Returns
a builder pre-filled with this shading model's parameters.

◆ getLightIntensity()

double luciad::PbrShadingModel::getLightIntensity ( ) const

Returns the light intensity used for the PBR lighting, a linear multiplier on the resulting shading.

A value of 1 (the default) leaves the shading unchanged, values above 1 brighten it, and values below 1 darken it. A value of 0 removes the PBR light contribution entirely. The value must not be negative.

Returns
the light intensity used for the PBR lighting.
See also
PbrShadingModel::Builder::lightIntensity

◆ getMetallicFactor()

double luciad::PbrShadingModel::getMetallicFactor ( ) const

Returns the metallic factor applied to PBR materials.

The final metallic value is the asset's own metallic (its material factor times any metallic-roughness texture) multiplied by this factor and then increased by the metallic offset. A factor of 1 (the default) leaves the asset's own metallic unchanged before the offset is added.

Returns
the metallic factor applied to PBR materials.
See also
PbrShadingModel::Builder::metallic

◆ getMetallicOffset()

double luciad::PbrShadingModel::getMetallicOffset ( ) const

Returns the metallic offset applied to PBR materials.

Returns
the metallic offset applied to PBR materials.
See also
PbrShadingModel::Builder::metallic

◆ getRoughnessFactor()

double luciad::PbrShadingModel::getRoughnessFactor ( ) const

Returns the roughness factor applied to PBR materials.

The final roughness value is the asset's own roughness (its material factor times any metallic-roughness texture) multiplied by this factor and then increased by the roughness offset. A factor of 1 (the default) leaves the asset's own roughness unchanged before the offset is added.

Returns
the roughness factor applied to PBR materials.
See also
PbrShadingModel::Builder::roughness

◆ getRoughnessOffset()

double luciad::PbrShadingModel::getRoughnessOffset ( ) const

Returns the roughness offset applied to PBR materials.

Returns
the roughness offset applied to PBR materials.
See also
PbrShadingModel::Builder::roughness

◆ isDirectionalLightingEnabled()

bool luciad::PbrShadingModel::isDirectionalLightingEnabled ( ) const

Returns whether PBR shading includes directional lighting.

This is lighting coming from the light that is configured on the map. When true (the default), the map's light (see luciad::LightEffect) adds a directional diffuse and specular contribution to PBR-shaded surfaces.

Returns
whether PBR shading includes directional lighting.
See also
PbrShadingModel::Builder::directionalLighting

◆ isIgnoreUnlitPropertyEnabled()

bool luciad::PbrShadingModel::isIgnoreUnlitPropertyEnabled ( ) const

Returns whether a material's unlit property is ignored so that PBR shading is still applied to it.

By default this is false: a glTF material that carries the KHR_materials_unlit extension is left unshaded, showing only its base color regardless of the map's light. When true, that extension is ignored and the material is shaded like any other PBR material.

Returns
whether a material's unlit property is ignored so that PBR shading is still applied to it.
See also
PbrShadingModel::Builder::ignoreUnlitProperty

◆ isImageBasedLightingEnabled()

bool luciad::PbrShadingModel::isImageBasedLightingEnabled ( ) const

Returns whether PBR shading includes image-based lighting (IBL).

When true (the default), the map's environment map (see luciad::EnvironmentMapEffect) provides ambient and reflection lighting to PBR-shaded surfaces. IBL only contributes when a reflection map is configured on the map.

Returns
whether PBR shading includes image-based lighting (IBL).
See also
PbrShadingModel::Builder::imageBasedLighting

◆ newBuilder()

Builder luciad::PbrShadingModel::newBuilder ( )
static

Creates a new builder with the default PBR parameters.

Returns
a new builder.