Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::pbr_material Class Reference

Class for physically-based rendering (PBR) materials. More...

#include <material.h>

Inheritance diagram for unravel::pbr_material:
crtp_meta_type< pbr_material, material >

Public Member Functions

auto clone () const -> std::shared_ptr< material > override
 
auto get_base_color () const -> const math::color &
 Gets the base color of the material.
 
void set_base_color (const math::color &val)
 Sets the base color of the material.
 
auto get_subsurface_color () const -> const math::color &
 Gets the subsurface color of the material.
 
void set_subsurface_color (const math::color &val)
 Sets the subsurface color of the material.
 
auto get_emissive_color () const -> const math::color &
 Gets the emissive color of the material.
 
void set_emissive_color (const math::color &val)
 Sets the emissive color of the material.
 
auto get_roughness () const -> float
 Gets the roughness of the material.
 
void set_roughness (float roughness)
 Sets the roughness of the material.
 
auto get_metalness () const -> float
 Gets the metalness of the material.
 
void set_metalness (float metalness)
 Sets the metalness of the material.
 
auto get_bumpiness () const -> float
 Gets the bumpiness of the material.
 
void set_bumpiness (float bumpiness)
 Sets the bumpiness of the material.
 
auto get_alpha_test_value () const -> float
 Gets the alpha test value of the material.
 
void set_alpha_test_value (float alpha_test_value)
 Sets the alpha test value of the material.
 
auto get_surface_data () const -> const math::vec4 &
 Gets the surface data of the material.
 
auto get_surface_data2 () const -> math::vec4
 Gets additional surface data for the material.
 
auto metalness_roughness_combined () const -> bool
 
auto get_tiling () const -> const math::vec2 &
 Gets the tiling factor of the material.
 
void set_tiling (const math::vec2 &tiling)
 Sets the tiling factor of the material.
 
auto get_dither_threshold () const -> const math::vec2 &
 Gets the dither threshold of the material.
 
void set_dither_threshold (const math::vec2 &threshold)
 Sets the dither threshold of the material.
 
auto get_color_map () const -> const asset_handle< gfx::texture > &
 Gets the color map of the material.
 
void set_color_map (const asset_handle< gfx::texture > &val)
 Sets the color map of the material.
 
auto get_normal_map () const -> const asset_handle< gfx::texture > &
 Gets the normal map of the material.
 
void set_normal_map (const asset_handle< gfx::texture > &val)
 Sets the normal map of the material.
 
auto get_roughness_map () const -> const asset_handle< gfx::texture > &
 Gets the roughness map of the material.
 
void set_roughness_map (const asset_handle< gfx::texture > &val)
 Sets the roughness map of the material.
 
auto get_metalness_map () const -> const asset_handle< gfx::texture > &
 Gets the metalness map of the material.
 
void set_metalness_map (const asset_handle< gfx::texture > &val)
 Sets the metalness map of the material.
 
auto get_ao_map () const -> const asset_handle< gfx::texture > &
 Gets the ambient occlusion map of the material.
 
void set_ao_map (const asset_handle< gfx::texture > &val)
 Sets the ambient occlusion map of the material.
 
auto get_emissive_map () const -> const asset_handle< gfx::texture > &
 Gets the emissive map of the material.
 
void set_emissive_map (const asset_handle< gfx::texture > &val)
 Sets the emissive map of the material.
 
- Public Member Functions inherited from crtp_meta_type< pbr_material, material >
virtual auto get_meta_type () const -> entt::meta_type
 
auto is () const -> bool
 
auto is (const entt::meta_type &type) const -> bool
 
virtual auto as_derived () -> entt::meta_any
 

Additional Inherited Members

- Static Public Member Functions inherited from crtp_meta_type< pbr_material, material >
static auto get_static_meta_type () -> entt::meta_type
 

Detailed Description

Class for physically-based rendering (PBR) materials.

Definition at line 99 of file material.h.

Member Function Documentation

◆ clone()

auto unravel::pbr_material::clone ( ) const -> std::shared_ptr<material>
override

Definition at line 74 of file material.cpp.

◆ get_alpha_test_value()

auto unravel::pbr_material::get_alpha_test_value ( ) const -> float
inline

Gets the alpha test value of the material.

Returns
The alpha test value.

Definition at line 218 of file material.h.

◆ get_ao_map()

auto unravel::pbr_material::get_ao_map ( ) const -> const asset_handle<gfx::texture>&
inline

Gets the ambient occlusion map of the material.

Returns
A constant reference to the ambient occlusion map asset handle.

Definition at line 371 of file material.h.

◆ get_base_color()

auto unravel::pbr_material::get_base_color ( ) const -> const math::color&
inline

Gets the base color of the material.

Returns
A constant reference to the base color.

Definition at line 110 of file material.h.

◆ get_bumpiness()

auto unravel::pbr_material::get_bumpiness ( ) const -> float
inline

Gets the bumpiness of the material.

Returns
The bumpiness value.

Definition at line 200 of file material.h.

◆ get_color_map()

auto unravel::pbr_material::get_color_map ( ) const -> const asset_handle<gfx::texture>&
inline

Gets the color map of the material.

Returns
A constant reference to the color map asset handle.

Definition at line 299 of file material.h.

◆ get_dither_threshold()

auto unravel::pbr_material::get_dither_threshold ( ) const -> const math::vec2&
inline

Gets the dither threshold of the material.

Returns
A constant reference to the dither threshold vector.

Definition at line 281 of file material.h.

◆ get_emissive_color()

auto unravel::pbr_material::get_emissive_color ( ) const -> const math::color&
inline

Gets the emissive color of the material.

Returns
A constant reference to the emissive color.

Definition at line 146 of file material.h.

◆ get_emissive_map()

auto unravel::pbr_material::get_emissive_map ( ) const -> const asset_handle<gfx::texture>&
inline

Gets the emissive map of the material.

Returns
A constant reference to the emissive map asset handle.

Definition at line 389 of file material.h.

◆ get_metalness()

auto unravel::pbr_material::get_metalness ( ) const -> float
inline

Gets the metalness of the material.

Returns
The metalness value.

Definition at line 182 of file material.h.

◆ get_metalness_map()

auto unravel::pbr_material::get_metalness_map ( ) const -> const asset_handle<gfx::texture>&
inline

Gets the metalness map of the material.

Returns
A constant reference to the metalness map asset handle.

Definition at line 353 of file material.h.

◆ get_normal_map()

auto unravel::pbr_material::get_normal_map ( ) const -> const asset_handle<gfx::texture>&
inline

Gets the normal map of the material.

Returns
A constant reference to the normal map asset handle.

Definition at line 317 of file material.h.

◆ get_roughness()

auto unravel::pbr_material::get_roughness ( ) const -> float
inline

Gets the roughness of the material.

Returns
The roughness value.

Definition at line 164 of file material.h.

◆ get_roughness_map()

auto unravel::pbr_material::get_roughness_map ( ) const -> const asset_handle<gfx::texture>&
inline

Gets the roughness map of the material.

Returns
A constant reference to the roughness map asset handle.

Definition at line 335 of file material.h.

◆ get_subsurface_color()

auto unravel::pbr_material::get_subsurface_color ( ) const -> const math::color&
inline

Gets the subsurface color of the material.

Returns
A constant reference to the subsurface color.

Definition at line 128 of file material.h.

◆ get_surface_data()

auto unravel::pbr_material::get_surface_data ( ) const -> const math::vec4&
inline

Gets the surface data of the material.

Returns
A constant reference to the surface data vector.

Definition at line 236 of file material.h.

◆ get_surface_data2()

auto unravel::pbr_material::get_surface_data2 ( ) const -> math::vec4
inline

Gets additional surface data for the material.

Returns
A vector containing additional surface data.

Definition at line 245 of file material.h.

◆ get_tiling()

auto unravel::pbr_material::get_tiling ( ) const -> const math::vec2&
inline

Gets the tiling factor of the material.

Returns
A constant reference to the tiling vector.

Definition at line 263 of file material.h.

◆ metalness_roughness_combined()

auto unravel::pbr_material::metalness_roughness_combined ( ) const -> bool
inline

Definition at line 254 of file material.h.

◆ set_alpha_test_value()

void unravel::pbr_material::set_alpha_test_value ( float alpha_test_value)
inline

Sets the alpha test value of the material.

Parameters
alpha_test_valueThe alpha test value to set.

Definition at line 227 of file material.h.

◆ set_ao_map()

void unravel::pbr_material::set_ao_map ( const asset_handle< gfx::texture > & val)
inline

Sets the ambient occlusion map of the material.

Parameters
valThe ambient occlusion map asset handle to set.

Definition at line 380 of file material.h.

◆ set_base_color()

void unravel::pbr_material::set_base_color ( const math::color & val)
inline

Sets the base color of the material.

Parameters
valThe base color to set.

Definition at line 119 of file material.h.

◆ set_bumpiness()

void unravel::pbr_material::set_bumpiness ( float bumpiness)
inline

Sets the bumpiness of the material.

Parameters
bumpinessThe bumpiness value to set.

Definition at line 209 of file material.h.

◆ set_color_map()

void unravel::pbr_material::set_color_map ( const asset_handle< gfx::texture > & val)
inline

Sets the color map of the material.

Parameters
valThe color map asset handle to set.

Definition at line 308 of file material.h.

◆ set_dither_threshold()

void unravel::pbr_material::set_dither_threshold ( const math::vec2 & threshold)
inline

Sets the dither threshold of the material.

Parameters
thresholdThe dither threshold to set.

Definition at line 290 of file material.h.

◆ set_emissive_color()

void unravel::pbr_material::set_emissive_color ( const math::color & val)
inline

Sets the emissive color of the material.

Parameters
valThe emissive color to set.

Definition at line 155 of file material.h.

◆ set_emissive_map()

void unravel::pbr_material::set_emissive_map ( const asset_handle< gfx::texture > & val)
inline

Sets the emissive map of the material.

Parameters
valThe emissive map asset handle to set.

Definition at line 398 of file material.h.

◆ set_metalness()

void unravel::pbr_material::set_metalness ( float metalness)
inline

Sets the metalness of the material.

Parameters
metalnessThe metalness value to set.

Definition at line 191 of file material.h.

◆ set_metalness_map()

void unravel::pbr_material::set_metalness_map ( const asset_handle< gfx::texture > & val)
inline

Sets the metalness map of the material.

Parameters
valThe metalness map asset handle to set.

Definition at line 362 of file material.h.

◆ set_normal_map()

void unravel::pbr_material::set_normal_map ( const asset_handle< gfx::texture > & val)
inline

Sets the normal map of the material.

Parameters
valThe normal map asset handle to set.

Definition at line 326 of file material.h.

◆ set_roughness()

void unravel::pbr_material::set_roughness ( float roughness)
inline

Sets the roughness of the material.

Parameters
roughnessThe roughness value to set.

Definition at line 173 of file material.h.

◆ set_roughness_map()

void unravel::pbr_material::set_roughness_map ( const asset_handle< gfx::texture > & val)
inline

Sets the roughness map of the material.

Parameters
valThe roughness map asset handle to set.

Definition at line 344 of file material.h.

◆ set_subsurface_color()

void unravel::pbr_material::set_subsurface_color ( const math::color & val)
inline

Sets the subsurface color of the material.

Parameters
valThe subsurface color to set.

Definition at line 137 of file material.h.

◆ set_tiling()

void unravel::pbr_material::set_tiling ( const math::vec2 & tiling)
inline

Sets the tiling factor of the material.

Parameters
tilingThe tiling factor to set.

Definition at line 272 of file material.h.


The documentation for this class was generated from the following files: