Repository navigation
Expand file tree
/
Copy pathApplicationData.h
More file actions
55 lines (46 loc) · 1.83 KB
/
Copy pathApplicationData.h
File metadata and controls
55 lines (46 loc) · 1.83 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
48
49
50
51
52
53
54
55
/**
* @file ApplicationData.h
* @brief This header file keeps user-provided application data (vertices, indices etc.).
* @author Mustafa Yemural (myemural)
* @date 20.01.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::real_time_lighting::environment_mapping::cubemap_refractions
{
inline const std::vector enabledMaterialComponents{common::scene::MaterialComponent::DIFFUSE_COLOR_VEC4,
common::scene::MaterialComponent::AMBIENT_STRENGTH_FLOAT};
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)};
// Constants
inline constexpr auto kLightDirection = glm::vec3(-0.1f, -0.4f, -0.7f);
inline constexpr auto kLightColor = glm::vec3(1.0f, 1.0f, 1.0f);
inline constexpr auto kDiffuseColor = glm::vec3(1.0f, 1.0f, 1.0f);
inline constexpr auto kAmbientStrength = 0.05f;
inline constexpr auto kSpecularStrength = 0.8f;
inline constexpr auto kSpecularShininess = 128.0f;
struct alignas(16) LightUbo
{
glm::vec4 lightDirection; // xyz = Light Direction
glm::vec4 lightColor; // xyz = Light Color
};
struct SkyboxPushConstants
{
glm::mat4 view;
glm::mat4 projection;
};
struct ScenePushConstants
{
glm::mat4 view;
glm::mat4 projection;
glm::vec4 cameraPosition;
std::uint32_t objectId;
};
} // namespace examples::real_time_lighting::environment_mapping::cubemap_refractions