![]() |
Lysa
0.0
Lysa 3D Engine
|
Simple albedo/specular/normal material
Inheritance diagram for StandardMaterial:Classes | |
| struct | TextureInfo |
Public Member Functions | |
| StandardMaterial (const std::string &name="StandardMaterial") | |
| const auto & | getAlbedoColor () const |
| void | setAlbedoColor (const float4 &color) |
| const auto & | getDiffuseTexture () const |
| void | setDiffuseTexture (const TextureInfo &texture) |
| const auto & | getNormalTexture () const |
| void | setNormalTexture (const TextureInfo &texture) |
| auto | getMetallicFactor () const |
| void | setMetallicFactor (float metallic) |
| const auto & | getMetallicTexture () const |
| void | setMetallicTexture (const TextureInfo &texture) |
| float | getRoughnessFactor () const |
| void | setRoughnessFactor (float roughness) |
| const auto & | getRoughnessTexture () const |
| void | setRoughnessTexture (const TextureInfo &texture) |
| const auto & | getEmissiveTexture () const |
| float3 | getEmissiveFactor () const |
| void | setEmissiveFactor (const float3 &emissive) |
| float | getEmissiveStrength () const |
| void | setEmissiveStrength (float strength) |
| void | setEmissiveTexture (const TextureInfo &texture) |
| auto | getNormalScale () const |
| void | setNormalScale (float scale) |
| MaterialData | getMaterialData () const override |
| pipeline_id | getPipelineId () const override |
Public Member Functions inherited from Material | |
| auto | getCullMode () const |
| void | setCullMode (const vireo::CullMode mode) |
| auto | getTransparency () const |
| void | setTransparency (const Transparency transparencyMode) |
| auto | getAlphaScissor () const |
| void | setAlphaScissor (const float scissor) |
| auto | isUploaded () const |
| void | upload () |
| const auto & | getMaterialIndex () const |
| auto | getType () const |
| void | setBypassUpload (const bool bypass) |
Public Member Functions inherited from Resource | |
| Resource (const std::string &name) | |
| auto | getId () const |
| const auto & | getName () const |
| bool | operator== (const Resource &other) const |
| bool | operator< (const Resource &other) const |
| bool | operator> (const Resource &other) const |
| virtual std::shared_ptr< Resource > | duplicate () const |
Public Member Functions inherited from Object | |
| void | connect (const Signal::signal &name, const Signal::Handler &handler) |
| void | connect (const Signal::signal &name, const std::function< void ()> &handler) |
| void | emit (const Signal::signal &name, void *params=nullptr) |
| virtual std::string | toString () const |
| Object () = default | |
| virtual | ~Object () = default |
Additional Inherited Members | |
Public Types inherited from Material | |
| enum | Type { STANDARD, SHADER } |
Protected Member Functions inherited from Material | |
| Material (Type type, const std::string &name) | |
| StandardMaterial | ( | const std::string & | name = "StandardMaterial" | ) |
Creates a StandardMaterial with default parameters
|
inline |
Returns the material's base color.
|
inline |
Returns the diffuse texture (texture to multiply by albedo color. Used for basic texturing of objects).
|
inline |
Return the emissive colors factor
|
inline |
Return the emissive colors strength
|
inline |
Returns the emissive colors image texture
|
overridevirtual |
Implements lysa::Material::getMaterialData()
|
inline |
Returns the metallic factor
|
inline |
Return the metallic image texture. Only the BLUE channel is used by the default shader.
|
inline |
Returns the scale applied to the normal image texture. See https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#_material_normaltextureinfo_scale
|
inline |
Returns the normal texture
|
overridevirtual |
Implements lysa::Material::getPipelineId()
|
inline |
Returns the roughness factor
|
inline |
Returns the roughness image texture. Only the RED channel is used by the default shader.
| void setAlbedoColor | ( | const float4 & | color | ) |
Sets the material's base color.
| void setDiffuseTexture | ( | const TextureInfo & | texture | ) |
Sets the diffuse texture (texture to multiply by albedo color. Used for basic texturing of objects).
| void setEmissiveFactor | ( | const float3 & | emissive | ) |
Sets the emissive colors factor
| void setEmissiveStrength | ( | float | strength | ) |
Sets the emissive colors strength
| void setEmissiveTexture | ( | const TextureInfo & | texture | ) |
Sets the emissive colors image texture. Used as a linear RGB texture by the default shader.
| void setMetallicFactor | ( | float | metallic | ) |
Sets the metallic factor
| void setMetallicTexture | ( | const TextureInfo & | texture | ) |
Sets the metallic image texture. Only the BLUE channel is used by the default shader.
| void setNormalScale | ( | float | scale | ) |
Sets the scale applied to the normal image texture. See https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#_material_normaltextureinfo_scale
| void setNormalTexture | ( | const TextureInfo & | texture | ) |
Sets the normal texture
| void setRoughnessFactor | ( | float | roughness | ) |
Sets the roughness factor
| void setRoughnessTexture | ( | const TextureInfo & | texture | ) |
Sets the roughness image texture. Only the RED channel is used by the default shader.