Quake II RTX doxygen  1.0 dev
sky.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 _SHADER_PHYSICAL_SKY_
20 #define _SHADER_PHYSICAL_SKY_
21 
22 #define PHYSICAL_SKY_FLAG_NONE (0)
23 
24 #define PHYSICAL_SKY_FLAG_USE_SKYBOX (1 << 0)
25 #define PHYSICAL_SKY_FLAG_DRAW_MOUNTAINS (1 << 1)
26 #define PHYSICAL_SKY_FLAG_DRAW_CLOUDS (1 << 2)
27 
28 #define PHYSICAL_SKY_MASK_OFFSET (PHYSICAL_SKY_FLAG_DRAW_CLOUDS - 1)
29 
30 
31 #ifndef VKPT_SHADER
32 
33 
34 
35 #else
36 bool useSkybox() {
37  return (global_ubo.physical_sky_flags & PHYSICAL_SKY_FLAG_USE_SKYBOX) != 0;
38 }
39 
40 bool drawMountains() {
41  return (global_ubo.physical_sky_flags & PHYSICAL_SKY_FLAG_DRAW_MOUNTAINS) != 0;
42 }
43 
44 bool drawClouds() {
45  return (global_ubo.physical_sky_flags & PHYSICAL_SKY_FLAG_DRAW_CLOUDS) != 0;
46 }
47 #endif
48 
49 #endif // _SHADER_PHYSICAL_SKY_
PHYSICAL_SKY_FLAG_DRAW_CLOUDS
#define PHYSICAL_SKY_FLAG_DRAW_CLOUDS
Definition: sky.h:26
PHYSICAL_SKY_FLAG_USE_SKYBOX
#define PHYSICAL_SKY_FLAG_USE_SKYBOX
Definition: sky.h:24
PHYSICAL_SKY_FLAG_DRAW_MOUNTAINS
#define PHYSICAL_SKY_FLAG_DRAW_MOUNTAINS
Definition: sky.h:25