Skip to main content

MaterialShaderPropertiesOverride.ixx File

Overrides for material properties to customize rendering parameters. More...

Included Headers

Namespaces Index

namespacehelios
namespacerendering

Graphics rendering infrastructure. More...

namespacematerial

Classes Index

structMaterialShaderPropertiesOverride

Configuration container for overriding specific material properties. More...

Description

Overrides for material properties to customize rendering parameters.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file MaterialShaderPropertiesOverride.ixx
3 * @brief Overrides for material properties to customize rendering parameters.
4 */
5module;
6
7#include <optional>
8
9export module helios.rendering.material.MaterialShaderPropertiesOverride;
10
11
12import helios.math.types;
13import helios.rendering.shader.UniformValueMap;
14import helios.rendering.shader.UniformSemantics;
15
16
17export namespace helios::rendering::material {
18
19 /**
20 * @brief Configuration container for overriding specific material properties.
21 *
22 * This struct holds optional data values that can be used to override the default
23 * properties defined in MaterialShaderProperties used by a Material.
24 * Only properties for which a value is present will be applied as overrides.
25 *
26 * This struct is mutable by design. Changing its values will impact all MaterialInstances
27 * using **this** instance.
28 */
30
31
32 /**
33 * @brief Optional base color override for the material.
34 */
35 std::optional<helios::math::vec4f> baseColor;
36
37 /**
38 * @brief Optional roughness override for the material (range [0, 1]).
39 */
40 std::optional<float> roughness;
41
42 /**
43 * @brief Writes this MaterialShaderPropertiesOverride's values into the given map.
44 *
45 * This method is typically called **after** the Material's base properties were
46 * written into the map.
47 *
48 * @param uniformValueMap Target map receiving the uniform values.
49 */
50 void writeUniformValues(helios::rendering::shader::UniformValueMap& uniformValueMap) const noexcept {
51
52 if (baseColor) {
54 }
55
56 if (roughness) {
58 }
59 }
60
61 };
62}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.