-
Notifications
You must be signed in to change notification settings - Fork 403
/
sh_GlobalUniforms.h
44 lines (35 loc) · 1.3 KB
/
sh_GlobalUniforms.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// This file is automatically included in every shader.
#ifndef INTERNAL_GLOBAL_UNIFORMS_H
#define INTERNAL_GLOBAL_UNIFORMS_H
layout(std140, set = -1, binding = 0) uniform g_GlobalUniforms
{
// Whether the backbuffer is currently being drawn to.
bool g_BackbufferDraw;
// Whether the depth values range from 0 to 1. If false, depth values range from -1 to 1.
// OpenGL uses [-1, 1], Vulkan/D3D/MTL all use [0, 1].
bool g_IsDepthRangeZeroToOne;
// Whether the clip space ranges from -1 (top) to 1 (bottom). If false, the clip space ranges from -1 (bottom) to 1 (top).
bool g_IsClipSpaceYInverted;
// Whether the texture coordinates begin in the top-left of the texture. If false, (0, 0) is the bottom-left texel of the texture.
bool g_IsUvOriginTopLeft;
mat4 g_ProjMatrix;
mat3 g_ToMaskingSpace;
bool g_IsMasking;
highp float g_CornerRadius;
highp float g_CornerExponent;
highp vec4 g_MaskingRect;
highp float g_BorderThickness;
lowp mat4 g_BorderColour;
mediump float g_MaskingBlendRange;
lowp float g_AlphaExponent;
highp vec2 g_EdgeOffset;
bool g_DiscardInner;
highp float g_InnerCornerRadius;
// 0 -> None
// 1 -> ClampToEdge
// 2 -> ClampToBorder
// 3 -> Repeat
int g_WrapModeS;
int g_WrapModeT;
};
#endif