53599592e0
Comes with backends for Vulkan, Metal, Direct3D 11.1, and OpenGL (ES). All APIs are private for now. Shader conditioning (i.e. generating a QRhiShader in memory or on disk from some shader source code) is done via the tools and APIs provided by qt-labs/qtshadertools. The OpenGL support follows the cross-platform tradition of requiring ES 2.0 only, while optionally using some (ES) 3.x features. It can operate in core profile contexts as well. Task-number: QTBUG-70287 Change-Id: I246f2e36d562e404012c05db2aa72487108aa7cc Reviewed-by: Lars Knoll <lars.knoll@qt.io>
23 lines
452 B
GLSL
23 lines
452 B
GLSL
#version 440
|
|
|
|
layout(location = 0) in vec3 v_color;
|
|
|
|
layout(location = 0) out vec4 c0;
|
|
layout(location = 1) out vec4 c1;
|
|
layout(location = 2) out vec4 c2;
|
|
layout(location = 3) out vec4 c3;
|
|
|
|
layout(std140, binding = 0) uniform buf {
|
|
mat4 mvp;
|
|
float opacity;
|
|
} ubuf;
|
|
|
|
void main()
|
|
{
|
|
vec4 c = vec4(v_color * ubuf.opacity, ubuf.opacity);
|
|
c0 = vec4(c.r, 0, 0, c.a);
|
|
c1 = vec4(0, c.g, 0, c.a);
|
|
c2 = vec4(0, 0, c.b, c.a);
|
|
c3 = c;
|
|
}
|