Repository navigation
Expand file tree
/
Copy pathApplicationData.h
More file actions
47 lines (39 loc) · 1.8 KB
/
Copy pathApplicationData.h
File metadata and controls
47 lines (39 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
* @file ApplicationData.h
* @brief This header file keeps user-provided application data (vertices, indices etc.).
* @author Mustafa Yemural (myemural)
* @date 17.05.2026
*
* Copyright (c) 2025 Mustafa Yemural - www.mustafayemural.com
* Released under the MIT License
* https://opensource.org/licenses/MIT
*/
#pragma once
#include <glm/glm.hpp>
namespace examples::physically_based_rendering::textured_pbr::normal_map_pbr
{
inline const std::vector enabledMaterialComponents{
common::scene::MaterialComponent::ALBEDO_COLOR_VEC4, common::scene::MaterialComponent::ROUGHNESS_FLOAT,
common::scene::MaterialComponent::METALLIC_FLOAT, common::scene::MaterialComponent::ALBEDO_MAP_TEXTURE,
common::scene::MaterialComponent::ROUGHNESS_MAP_TEXTURE, common::scene::MaterialComponent::METALLIC_MAP_TEXTURE,
common::scene::MaterialComponent::NORMAL_MAP_TEXTURE};
inline const std::vector attributeLayouts{
std::pair(common::scene::AttributeType::POSITION, common::scene::AccessorType::VEC3),
std::pair(common::scene::AttributeType::TEXCOORD, common::scene::AccessorType::VEC2),
std::pair(common::scene::AttributeType::NORMAL, common::scene::AccessorType::VEC3),
std::pair(common::scene::AttributeType::TANGENT, common::scene::AccessorType::VEC4)};
inline constexpr auto kLightDirection = glm::vec3(-0.4f, -0.4f, -0.4f);
inline constexpr auto kLightColor = glm::vec3(1.0f, 1.0f, 1.0f);
struct alignas(16) LightUbo
{
glm::vec4 lightDirection; // xyz = Light Direction
glm::vec4 lightColorAndIntensity; // xyz = Light Color, w = Light Intensity
};
struct MeshPushConstants
{
glm::mat4 view;
glm::mat4 projection;
glm::vec4 cameraPosition;
std::uint32_t objectId;
};
} // namespace examples::physically_based_rendering::textured_pbr::normal_map_pbr