Photon Common Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1#pragma once
2
28#include <cstddef>
29#include <string>
30
32// Core Settings //
34
37#define PH_ENGINE_VERSION "2.0.0"
38
41#define PH_PSDL_VERSION "1.1.0"
42
46#ifdef PH_CONFIG_ENABLE_DEBUG
47#define PH_DEBUG 1
48#else
49#define PH_DEBUG 0
50#endif
51
52#ifdef PH_CONFIG_ENABLE_PROFILING
53#define PH_PROFILING 1
54#else
55#define PH_PROFILING 0
56#endif
57
60#define PH_ABORT_ON_ASSERTION_FAILED 1
61
64#define PH_PRINT_STACK_TRACE_ON_ASSERTION_FAILED 1
65
68#define PH_STRICT_FLOATING_POINT_SIZES 1
69
70// Log as soon as possible (primarily for debugging).
71//#define PH_UNBUFFERED_LOG
72
75#ifdef PH_CONFIG_DOUBLE_PRECISION_REAL
76#define PH_USE_DOUBLE_REAL 1
77#else
78#define PH_USE_DOUBLE_REAL 0
79#endif
80
83#define PH_ENABLE_DEBUG_LOG PH_DEBUG
84
85#define PH_ENSURE_LOCKFREE_ALGORITHMS_ARE_LOCKLESS 1
86
90#define PH_MEMORY_ARENA_DEFAULT_BLOCK_SIZE_IN_BYTES (static_cast<std::size_t>(512) * 1024)
91
92#define PH_TFUNCTION_DEFAULT_MIN_SIZE_IN_BYTES (static_cast<std::size_t>(64))
93
96#define PH_ENABLE_HIT_EVENT_STATS 0
97
106#define PH_STRICT_OBJECT_LIFETIME 0
107
110#define PH_LOG_FILE_DIRECTRY "./Logs/"
111
112#define PH_CONFIG_DIRECTORY "./Config/"
113#define PH_SCRIPT_DIRECTORY "./Script/"
114
117#define PH_INTERNAL_RESOURCE_DIRECTORY "./InternalResource/"
118
121#define PH_RENDERER_RESOURCE_DIRECTORY "./Photon-v2-Resource/Resource/"
122
124// Render Modes //
126
127#define PH_RENDER_MODE_LINEAR_SRGB 0
128#define PH_RENDER_MODE_ACES 1
129#define PH_RENDER_MODE_SPECTRAL 2
130#define PH_RENDER_MODE_FULL_SPECTRAL 3
131
132#define PH_RENDER_MODE PH_RENDER_MODE_LINEAR_SRGB
133
143#define PH_STRICT_ASYMMETRIC_IMPORTANCE_TRANSPORT 0
144
146// Data Structures //
148
149#define PH_SPECTRUM_SAMPLED_MIN_WAVELENGTH_NM 350
150#define PH_SPECTRUM_SAMPLED_MAX_WAVELENGTH_NM 850
151#define PH_SPECTRUM_SAMPLED_NUM_SAMPLES 100
152#define PH_HIT_PROBE_DEPTH 8
153
154#define PH_SDL_MAX_FIELDS 64
155#define PH_SDL_MAX_FUNCTIONS 64
156
160#define PH_HIT_PROBE_CACHE_BYTES 32
161
162#define PH_NUMERIC_IMAGE_MAX_ELEMENTS 4
163
165// Hardware Dependent Instruction Sets //
167
168#ifdef PH_CONFIG_USE_SIMD
169#define PH_USE_SIMD 1
170#else
171#define PH_USE_SIMD 0
172#endif
173
174#if PH_USE_SIMD
175
176#ifdef PH_CONFIG_HARDWARE_HAS_SSE
177#define PH_USE_SSE 1
178#else
179#define PH_USE_SSE 0
180#endif
181
182#ifdef PH_CONFIG_HARDWARE_HAS_SSE2
183#define PH_USE_SSE2 1
184#else
185#define PH_USE_SSE2 0
186#endif
187
188#ifdef PH_CONFIG_HARDWARE_HAS_SSE3
189#define PH_USE_SSE3 1
190#else
191#define PH_USE_SSE3 0
192#endif
193
194#ifdef PH_CONFIG_HARDWARE_HAS_SSSE3
195#define PH_USE_SSSE3 1
196#else
197#define PH_USE_SSSE3 0
198#endif
199
200#ifdef PH_CONFIG_HARDWARE_HAS_SSE4_1
201#define PH_USE_SSE4_1 1
202#else
203#define PH_USE_SSE4_1 0
204#endif
205
206#ifdef PH_CONFIG_HARDWARE_HAS_SSE4_2
207#define PH_USE_SSE4_2 1
208#else
209#define PH_USE_SSE4_2 0
210#endif
211
212#ifdef PH_CONFIG_HARDWARE_HAS_AVX
213#define PH_USE_AVX 1
214#else
215#define PH_USE_AVX 0
216#endif
217
218#ifdef PH_CONFIG_HARDWARE_HAS_AVX2
219#define PH_USE_AVX2 1
220#else
221#define PH_USE_AVX2 0
222#endif
223
224#endif
225// end `PH_USE_SIMD`
226
228// Miscellaneous //
230
231namespace ph
232{
233
234class Config final
235{
236public:
237 static std::string& RENDERER_RESOURCE_DIRECTORY();
238};
239
240}// end namespace ph
Definition config.h:235
static std::string & RENDERER_RESOURCE_DIRECTORY()
Definition config.cpp:7
The root for all renderer implementations.
Definition assertion.h:9