Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
sdl_component_enums.h
Go to the documentation of this file.
1#pragma once
2
4#include "SDL/sdl_interface.h"
5
6namespace ph
7{
8
10{
11 Unspecified = 0,
12
13 Schlick,
14 Exact
15};
16
18{
19 Unspecified = 0,
20
21 TrowbridgeReitz,// a.k.a. GGX
23};
24
26{
27 Unspecified = 0,
28
29 Equaled,
30 Squared,
31 PbrtV3
32};
33
35{
36 SdlEnumType sdlEnum("interface-fresnel");
37 sdlEnum.description("Controls the Fresnel model used.");
38
39 sdlEnum.addEntry(EnumType::Unspecified, "");
40 sdlEnum.addEntry(EnumType::Schlick, "schlick", "An approximative model developed by Schlick.");
41 sdlEnum.addEntry(EnumType::Exact, "exact", "The full-form Fresnel formula.");
42
43 return sdlEnum;
44}
45
47{
48 SdlEnumType sdlEnum("interface-microsurface");
49 sdlEnum.description("Controls the model for describing the micro structure of the interface.");
50
51 sdlEnum.addEntry(EnumType::Unspecified, "");
52 sdlEnum.addEntry(EnumType::TrowbridgeReitz, "ggx", "Formally known as the Trowbridge-Reitz distribution.");
53 sdlEnum.addEntry(EnumType::Beckmann, "beckmann", "The Beckmann distribution.");
54
55 return sdlEnum;
56}
57
59{
60 SdlEnumType sdlEnum("roughness-to-alpha");
61 sdlEnum.description(
62 "How roughness value will be mapped to alpha, a value that controls "
63 "surface normal distribution function.");
64
65 sdlEnum.addEntry(EnumType::Unspecified, "");
66
67 sdlEnum.addEntry(EnumType::Equaled, "equaled",
68 "Directly assign roughness value as-is to alpha.");
69
70 sdlEnum.addEntry(EnumType::Squared, "squared",
71 "Mapping for a perceptually linear roughness. According to a course note in SIGGRAPH 2014: "
72 "Moving Frostbite to Physically Based Rendering 3.0, P.68, they concluded that a squared "
73 "mapping gives slightly better distribution of the profiles (blur amount) among all mip "
74 "levels in the case of pre-integrated diffuse IBL maps.");
75
76 sdlEnum.addEntry(EnumType::PbrtV3, "pbrt-v3",
77 "The mapping used in PBRT-v3.");
78
79 return sdlEnum;
80}
81
83{
84 SdlEnumType sdlEnum("masking-shadowing");
85 sdlEnum.description(
86 "The type of masking and shadowing term for a microfacet distribution.");
87
88 sdlEnum.addEntry(EnumType::HightCorrelated, "");
89
90 sdlEnum.addEntry(EnumType::HightCorrelated, "height-correlated",
91 "Modeling the correlation between masking and shadowing due to the height of the microsurface.");
92
93 sdlEnum.addEntry(EnumType::Separable, "separable",
94 "Statistically independent masking and shadowing.");
95
96 sdlEnum.addEntry(EnumType::DirectionCorrelated, "dir-correlated",
97 "Modeling the correlation between masking and shadowing due to the differences between "
98 "incident and outgoing directions.");
99
100 sdlEnum.addEntry(EnumType::HeightDirectionCorrelated, "height-dir-correlated",
101 "Modeling the correlation between masking and shadowing due to both height and direction "
102 "differences.");
103
104 return sdlEnum;
105}
106
107}// end namespace ph
SDL enum implementation with common features. Enum value and string mapping are done in a brute-force...
Definition TSdlGeneralEnum.h:26
The root for all renderer implementations.
Definition EEngineProject.h:6
EInterfaceFresnel
Definition sdl_component_enums.h:10
ERoughnessToAlpha
Definition sdl_component_enums.h:26
EInterfaceMicrosurface
Definition sdl_component_enums.h:18
#define PH_DEFINE_SDL_ENUM(...)
Define a SDL enum with function-like syntax.
Definition sdl_interface.h:142