-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathConfigs.h
More file actions
72 lines (58 loc) · 2.01 KB
/
Configs.h
File metadata and controls
72 lines (58 loc) · 2.01 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#ifndef APP_SETTINGS
#define APP_SETTINGS
#include <string>
#include "volk.h"
namespace AppConfig
{
constexpr uint32_t InitialScreenWidth = 1600;
constexpr uint32_t InitialScreenHeight = 1200;
// Number of overlapping frames (Frame in flight)
constexpr uint32_t FrameOverlapCount = 2;
// VK_PRESENT_MODE_FIFO_KHR --> Lock to screen FPS
// VK_PRESENT_MODE_MAILBOX_KHR --> Triple buffering
constexpr VkPresentModeKHR PresentMode = VK_PRESENT_MODE_FIFO_KHR;
const std::string ScreenTitle = "Hello Vulkan";
const std::string ShaderFolder = "C://Users//azer//workspace//HelloVulkan//Shaders//";
const std::string ModelFolder = "C://Users//azer//workspace//HelloVulkan//Models//";
const std::string TextureFolder = "C://Users//azer//workspace//HelloVulkan//Textures//";
};
namespace CameraConfig
{
constexpr float Yaw = -90.0f;
constexpr float Pitch = 0.0f;
constexpr float Speed = 2.5f;
constexpr float Sensitivity = 0.1f;
constexpr float Zoom = 45.0f;
constexpr float Near = 0.1f;
constexpr float Far = 50.0f;
}
namespace ClusterForwardConfig
{
// Parameters similar to Doom 2016
constexpr uint32_t sliceCountX = 16;
constexpr uint32_t sliceCountY = 9;
constexpr uint32_t sliceCountZ = 24;
constexpr uint32_t numClusters = sliceCountX * sliceCountY * sliceCountZ;
// Note that this also has to be set inside the compute shader
constexpr uint32_t maxLightPerCluster = 150;
}
namespace IBLConfig
{
constexpr uint32_t OutputDiffuseSampleCount = 1024;
constexpr uint32_t InputCubeSideLength = 1024;
constexpr uint32_t OutputDiffuseSideLength = 32;
constexpr uint32_t OutputSpecularSideLength = 128;
constexpr uint32_t LayerCount = 6;
constexpr VkFormat CubeFormat = VK_FORMAT_R32G32B32A32_SFLOAT;
// BRDF LUT
constexpr uint32_t LUTSampleCount = 1024;
constexpr uint32_t LUTWidth = 256;
constexpr uint32_t LUTHeight = 256;
constexpr uint32_t LUTBufferSize = 2 * sizeof(float) * LUTWidth * LUTHeight;
}
namespace ShadowConfig
{
constexpr uint32_t DepthSize = 4096;
constexpr uint32_t CascadeCount = 4u;
}
#endif