Quake II RTX doxygen
1.0 dev
constants.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2019, NVIDIA CORPORATION. All rights reserved.
3
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
8
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License along
15
with this program; if not, write to the Free Software Foundation, Inc.,
16
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
*/
18
19
#ifndef _CONSTANTS_H_
20
#define _CONSTANTS_H_
21
22
#define GRAD_DWN (3)
23
24
#define SHADOWMAP_SIZE 4096
25
#define TERRAIN_SHADOWMAP_SIZE 2048
26
27
#define USE_NEAREST_TEXTURE_FILTER 0
28
29
#define HISTOGRAM_BINS 128
30
31
#define ALBEDO_TRANSFORM_SCALE 1.0
32
#define ALBEDO_TRANSFORM_BIAS -0.05
33
#define ALBEDO_TRANSFORM_POWER 0.4545
34
35
#define EMISSIVE_TRANSFORM_BIAS -0.001
36
37
#define MAX_MIRROR_ROUGHNESS 0.02
38
39
#define NUM_GLOBAL_TEXTUES 2048
40
41
#define NUM_BLUE_NOISE_TEX (128 * 4)
42
#define BLUE_NOISE_RES (256)
43
44
#define NUM_LIGHT_STATS_BUFFERS 3
45
46
#define PRIMARY_RAY_T_MAX 10000
47
48
#define MAX_CAMERAS 8
49
50
// Scaling factors for lighting components when they are stored in textures.
51
// FP16 and RGBE textures have very limited range, and these factors help bring the signal within that range.
52
#define STORAGE_SCALE_LF 1024
53
#define STORAGE_SCALE_HF 32
54
#define STORAGE_SCALE_SPEC 32
55
#define STORAGE_SCALE_HDR 128
56
57
#define MATERIAL_KIND_MASK 0xf0000000
58
#define MATERIAL_KIND_INVALID 0x00000000
59
#define MATERIAL_KIND_REGULAR 0x10000000
60
#define MATERIAL_KIND_CHROME 0x20000000
61
#define MATERIAL_KIND_WATER 0x30000000
62
#define MATERIAL_KIND_LAVA 0x40000000
63
#define MATERIAL_KIND_SLIME 0x50000000
64
#define MATERIAL_KIND_GLASS 0x60000000
65
#define MATERIAL_KIND_SKY 0x70000000
66
#define MATERIAL_KIND_INVISIBLE 0x80000000
67
#define MATERIAL_KIND_EXPLOSION 0x90000000
68
#define MATERIAL_KIND_TRANSPARENT 0xa0000000
69
#define MATERIAL_KIND_SCREEN 0xb0000000
70
#define MATERIAL_KIND_CAMERA 0xc0000000
71
#define MATERIAL_KIND_CHROME_MODEL 0xd0000000
72
73
#define MATERIAL_FLAG_LIGHT 0x08000000
74
#define MATERIAL_FLAG_CORRECT_ALBEDO 0x04000000
75
#define MATERIAL_FLAG_HANDEDNESS 0x02000000
76
#define MATERIAL_FLAG_WEAPON 0x01000000
77
#define MATERIAL_FLAG_WARP 0x00800000
78
#define MATERIAL_FLAG_FLOWING 0x00400000
79
#define MATERIAL_FLAG_DOUBLE_SIDED 0x00200000
80
#define MATERIAL_FLAG_SHELL_RED 0x00100000
81
#define MATERIAL_FLAG_SHELL_GREEN 0x00080000
82
#define MATERIAL_FLAG_SHELL_BLUE 0x00040000
83
84
#define MATERIAL_LIGHT_STYLE_MASK 0x0003f000
85
#define MATERIAL_LIGHT_STYLE_SHIFT 12
86
#define MATERIAL_INDEX_MASK 0x00000fff
87
88
#define CHECKERBOARD_FLAG_PRIMARY 1
89
#define CHECKERBOARD_FLAG_REFLECTION 2
90
#define CHECKERBOARD_FLAG_REFRACTION 4
91
92
#define MEDIUM_NONE 0
93
#define MEDIUM_WATER 1
94
#define MEDIUM_SLIME 2
95
#define MEDIUM_LAVA 3
96
#define MEDIUM_GLASS 4
97
98
#define ENVIRONMENT_NONE 0
99
#define ENVIRONMENT_STATIC 1
100
#define ENVIRONMENT_DYNAMIC 2
101
102
#define SHADER_MAX_ENTITIES 1024
103
#define SHADER_MAX_BSP_ENTITIES 128
104
#define MAX_LIGHT_SOURCES 32
105
#define MAX_LIGHT_STYLES 64
106
107
#define AS_FLAG_OPAQUE (1 << 0)
108
#define AS_FLAG_TRANSPARENT (1 << 1)
109
#define AS_FLAG_PARTICLES (1 << 2)
110
#define AS_FLAG_VIEWER_MODELS (1 << 3)
111
#define AS_FLAG_VIEWER_WEAPON (1 << 4)
112
#define AS_FLAG_EXPLOSIONS (1 << 5)
113
#define AS_FLAG_SKY (1 << 6)
114
#define AS_FLAG_CUSTOM_SKY (1 << 7)
115
#define AS_FLAG_EVERYTHING 0xFF
116
117
#define AS_INSTANCE_FLAG_DYNAMIC (1 << 23)
118
#define AS_INSTANCE_FLAG_SKY (1 << 22)
119
#define AS_INSTANCE_MASK_OFFSET (AS_INSTANCE_FLAG_SKY - 1)
120
121
#define SBT_RGEN_PRIMARY_RAYS 0
122
#define SBT_RGEN_REFLECT_REFRACT1 1
123
#define SBT_RGEN_REFLECT_REFRACT2 2
124
#define SBT_RGEN_DIRECT_LIGHTING 3
125
#define SBT_RGEN_DIRECT_LIGHTING_CAUSTICS 4
126
#define SBT_RGEN_INDIRECT_LIGHTING_FIRST 5
127
#define SBT_RGEN_INDIRECT_LIGHTING_SECOND 6
128
#define SBT_RMISS_PATH_TRACER 7
129
#define SBT_RMISS_SHADOW 8
130
#define SBT_RCHIT_OPAQUE 9
131
#define SBT_RAHIT_PARTICLE 10
132
#define SBT_RAHIT_BEAM 11
133
#define SBT_RAHIT_EXPLOSION 12
134
#define SBT_RAHIT_SPRITE 13
135
#define SBT_RCHIT_EMPTY 14
136
137
#endif
/*_CONSTANTS_H_*/
src
refresh
vkpt
shader
constants.h
Generated by
1.8.17