|
Vulkan Schnee 0.0.1
High-performance rendering engine
|
Stores the material data which is relevant for our current set of shaders. More...
#include <GltfLoader.h>
Public Member Functions | |
| GltfMaterialData ()=default | |
| GltfMaterialData (const tinygltf::Model &model, const tinygltf::Material &material, const StaticMeshExtensions &meshSettings) | |
| bool | hasTexture () const |
| Checks whether the material references a base color texture. | |
| uint32_t | getTextureIndex () const |
| Gets the engine texture index for the base color texture. | |
| bool | hasVulkanSchneeExtension () const |
| Checks whether the material has a Vulkan Schnee material extension. | |
| const VulkanSchneeMaterialExtension & | getVulkanSchneeExtension () const |
| Gets the parsed Vulkan Schnee material extension. | |
| std::string | getShaderName () const |
| Gets the shader name selected for this material. | |
| const Materials::MaterialData & | getMaterialData () const |
| Gets immutable engine material data generated from glTF and extension data. | |
| Materials::MaterialData & | getMaterialDataRef () |
| Gets mutable engine material data generated from glTF and extension data. | |
| uint32_t | getNormalTextureIndex () const |
| Gets the engine normal texture index. | |
| uint32_t | getRoughnessMetallicTextureIndex () const |
| Gets the engine metallic-roughness texture index. | |
| uint32_t | getEmissiveTextureIndex () const |
| Gets the engine emissive texture index. | |
| float | getRoughnessFactor () const |
| Gets the glTF roughness factor. | |
| float | getMetallicFactor () const |
| Gets the glTF metallic factor. | |
| float | getNormalScale () const |
| Gets the normal map scale. | |
| glm::vec3 | getEmissiveFactor () const |
| Gets the emissive factor. | |
| bool | hasNormalTexture () const |
| Checks whether the glTF material references a normal texture. | |
| bool | hasMetallicRoughnessTexture () const |
| Checks whether the glTF material references a metallic-roughness texture. | |
| bool | hasEmissiveTexture () const |
| Checks whether the glTF material references an emissive texture. | |
| int32_t | getGltfNormalTextureIndex () const |
| Gets the original glTF normal texture index. | |
| int32_t | getGltfMetallicRoughnessTextureIndex () const |
| Gets the original glTF metallic-roughness texture index. | |
| int32_t | getGltfEmissiveTextureIndex () const |
| Gets the original glTF emissive texture index. | |
| bool | hasLightmapTexture () const |
| Checks whether this material uses a lightmap texture path. | |
| const std::filesystem::path & | getLightmapPath () const |
| Gets the lightmap texture path from the engine extension. | |
Private Member Functions | |
| void | setupMaterialData () |
| void | parsePbrData (const tinygltf::Model &model, const tinygltf::Material &material) |
Private Attributes | |
| Materials::MaterialData | materialData |
| std::optional< MaterialExtensions > | materialExtensions |
| glm::vec4 | baseColorFactor = glm::vec4( 0.0f, 0.0f, 0.0f, 0.0f ) |
| uint32_t | textureIndex = std::numeric_limits<uint32_t>::max() |
| uint32_t | normalTextureIndex = 0xFFFFFFFF |
| uint32_t | roughnessMetallicTextureIndex = 0xFFFFFFFF |
| uint32_t | emissiveTextureIndex = 0xFFFFFFFF |
| float | roughnessFactor = 1.0f |
| float | metallicFactor = 0.0f |
| float | normalScale = 1.0f |
| glm::vec3 | emissiveFactor = glm::vec3( 0.0f ) |
| int32_t | gltfNormalTextureIndex = -1 |
| int32_t | gltfMetallicRoughnessTextureIndex = -1 |
| int32_t | gltfEmissiveTextureIndex = -1 |
| std::filesystem::path | lightmapPath |
Stores the material data which is relevant for our current set of shaders.
Extended with PBR texture indices and material factors for physically-based rendering.
Definition at line 504 of file GltfLoader.h.
|
default |
| Engine::Assets::Loaders::GltfLoader::GltfMaterialData::GltfMaterialData | ( | const tinygltf::Model & | model, |
| const tinygltf::Material & | material, | ||
| const StaticMeshExtensions & | meshSettings ) |
|
inlinenodiscard |
Gets the emissive factor.
Definition at line 620 of file GltfLoader.h.
References emissiveFactor.
|
inlinenodiscard |
Gets the engine emissive texture index.
Definition at line 584 of file GltfLoader.h.
References emissiveTextureIndex.
|
inlinenodiscard |
Gets the original glTF emissive texture index.
Definition at line 674 of file GltfLoader.h.
References gltfEmissiveTextureIndex.
|
inlinenodiscard |
Gets the original glTF metallic-roughness texture index.
Definition at line 665 of file GltfLoader.h.
References gltfMetallicRoughnessTextureIndex.
|
inlinenodiscard |
Gets the original glTF normal texture index.
Definition at line 656 of file GltfLoader.h.
References gltfNormalTextureIndex.
|
inlinenodiscard |
Gets the lightmap texture path from the engine extension.
Definition at line 692 of file GltfLoader.h.
References lightmapPath.
|
inlinenodiscard |
Gets immutable engine material data generated from glTF and extension data.
Definition at line 548 of file GltfLoader.h.
References materialData.
|
inlinenodiscard |
Gets mutable engine material data generated from glTF and extension data.
Definition at line 557 of file GltfLoader.h.
References materialData.
|
inlinenodiscard |
Gets the glTF metallic factor.
Definition at line 602 of file GltfLoader.h.
References metallicFactor.
|
inlinenodiscard |
Gets the normal map scale.
Definition at line 611 of file GltfLoader.h.
References normalScale.
|
inlinenodiscard |
Gets the engine normal texture index.
Definition at line 566 of file GltfLoader.h.
References normalTextureIndex.
|
inlinenodiscard |
Gets the glTF roughness factor.
Definition at line 593 of file GltfLoader.h.
References roughnessFactor.
|
inlinenodiscard |
Gets the engine metallic-roughness texture index.
Definition at line 575 of file GltfLoader.h.
References roughnessMetallicTextureIndex.
|
nodiscard |
Gets the shader name selected for this material.
|
nodiscard |
Gets the engine texture index for the base color texture.
|
nodiscard |
Gets the parsed Vulkan Schnee material extension.
|
inlinenodiscard |
Checks whether the glTF material references an emissive texture.
Definition at line 647 of file GltfLoader.h.
References gltfEmissiveTextureIndex.
|
inlinenodiscard |
Checks whether this material uses a lightmap texture path.
Definition at line 683 of file GltfLoader.h.
References lightmapPath.
|
inlinenodiscard |
Checks whether the glTF material references a metallic-roughness texture.
Definition at line 638 of file GltfLoader.h.
References gltfMetallicRoughnessTextureIndex.
|
inlinenodiscard |
Checks whether the glTF material references a normal texture.
Definition at line 629 of file GltfLoader.h.
References gltfNormalTextureIndex.
|
nodiscard |
Checks whether the material references a base color texture.
|
nodiscard |
Checks whether the material has a Vulkan Schnee material extension.
|
private |
|
private |
|
private |
Definition at line 704 of file GltfLoader.h.
|
private |
Definition at line 716 of file GltfLoader.h.
Referenced by getEmissiveFactor().
|
private |
Definition at line 710 of file GltfLoader.h.
Referenced by getEmissiveTextureIndex().
|
private |
Definition at line 721 of file GltfLoader.h.
Referenced by getGltfEmissiveTextureIndex(), and hasEmissiveTexture().
|
private |
Definition at line 720 of file GltfLoader.h.
Referenced by getGltfMetallicRoughnessTextureIndex(), and hasMetallicRoughnessTexture().
|
private |
Definition at line 719 of file GltfLoader.h.
Referenced by getGltfNormalTextureIndex(), and hasNormalTexture().
|
private |
Definition at line 724 of file GltfLoader.h.
Referenced by getLightmapPath(), and hasLightmapTexture().
|
private |
Definition at line 701 of file GltfLoader.h.
Referenced by getMaterialData(), and getMaterialDataRef().
|
private |
Definition at line 703 of file GltfLoader.h.
|
private |
Definition at line 714 of file GltfLoader.h.
Referenced by getMetallicFactor().
|
private |
Definition at line 715 of file GltfLoader.h.
Referenced by getNormalScale().
|
private |
Definition at line 708 of file GltfLoader.h.
Referenced by getNormalTextureIndex().
|
private |
Definition at line 713 of file GltfLoader.h.
Referenced by getRoughnessFactor().
|
private |
Definition at line 709 of file GltfLoader.h.
Referenced by getRoughnessMetallicTextureIndex().
|
private |
Definition at line 705 of file GltfLoader.h.