Overte C++ Documentation
ssao_shared.h
1 // <!
2 // Created by Olivier Prat on 2018/09/18
3 // Copyright 2013-2018 High Fidelity, Inc.
4 //
5 // Distributed under the Apache License, Version 2.0.
6 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
7 // !>
8 
9 // <@if not RENDER_UTILS_SSAO_SHARED_H@>
10 // <@def RENDER_UTILS_SSAO_SHARED_H@>
11 
12 // Hack comment to absorb the extra '//' scribe prepends
13 
14 #ifndef RENDER_UTILS_SSAO_SHARED_H
15 #define RENDER_UTILS_SSAO_SHARED_H
16 
17 #define SSAO_USE_QUAD_SPLIT 1
18 #define SSAO_BILATERAL_BLUR_USE_NORMAL 0
19 
20 #define SSAO_DEPTH_KEY_SCALE 300.0
21 
22 #if SSAO_USE_QUAD_SPLIT
23 #define SSAO_SPLIT_LOG2_COUNT 2
24 #else
25 #define SSAO_SPLIT_LOG2_COUNT 0
26 #endif
27 #define SSAO_SPLIT_COUNT (1 << SSAO_SPLIT_LOG2_COUNT)
28 
29 // glsl / C++ compatible source as interface for ambient occlusion
30 #ifdef __cplusplus
31 # define SSAO_VEC4 glm::vec4
32 # define SSAO_MAT4 glm::mat4
33 #else
34 # define SSAO_VEC4 vec4
35 # define SSAO_MAT4 mat4
36 #endif
37 
38 struct AmbientOcclusionParams {
39  SSAO_VEC4 _resolutionInfo;
40  SSAO_VEC4 _radiusInfo;
41  SSAO_VEC4 _ditheringInfo;
42  SSAO_VEC4 _sampleInfo;
43  SSAO_VEC4 _falloffInfo;
44  SSAO_VEC4 _sideSizes[2];
45 };
46 
47 struct AmbientOcclusionFrameParams {
48  SSAO_VEC4 _angleInfo;
49 };
50 
51 struct AmbientOcclusionBlurParams {
52  SSAO_VEC4 _blurInfo;
53  SSAO_VEC4 _blurAxis;
54 };
55 
56 #endif // RENDER_UTILS_SHADER_CONSTANTS_H
57 
58 // <@if 1@>
59 // Trigger Scribe include
60 // <@endif@> <!def that !>
61 
62 // <@endif@>
63 
64 // Hack Comment