aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickshapes/shaders_ng/conicalgradient.vert
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickshapes/shaders_ng/conicalgradient.vert')
-rw-r--r--src/quickshapes/shaders_ng/conicalgradient.vert10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/quickshapes/shaders_ng/conicalgradient.vert b/src/quickshapes/shaders_ng/conicalgradient.vert
index 3db027294b..c092198724 100644
--- a/src/quickshapes/shaders_ng/conicalgradient.vert
+++ b/src/quickshapes/shaders_ng/conicalgradient.vert
@@ -6,16 +6,22 @@ layout(location = 1) in vec4 vertexColor;
layout(location = 0) out vec2 coord;
layout(std140, binding = 0) uniform buf {
+#if QSHADER_VIEW_COUNT >= 2
+ mat4 matrix[QSHADER_VIEW_COUNT];
+#else
mat4 matrix;
+#endif
vec2 translationPoint;
float angle;
float opacity;
} ubuf;
-out gl_PerVertex { vec4 gl_Position; };
-
void main()
{
coord = vertexCoord.xy - ubuf.translationPoint;
+#if QSHADER_VIEW_COUNT >= 2
+ gl_Position = ubuf.matrix[gl_ViewIndex] * vertexCoord;
+#else
gl_Position = ubuf.matrix * vertexCoord;
+#endif
}