1f267b7e6d
What's more, demonstrate two types of rendering to a cubemap: one by one to each face, and by attaching all faces as color attachments in one go. Both are used by Qt Quick 3D in connection with shadows, so this proves that the same is possible to implement with QRhi. Task-number: QTBUG-81261 Change-Id: I5c7077224d7cae0dd6ea02ac30a9e6f9f1f0c229 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
21 lines
317 B
GLSL
21 lines
317 B
GLSL
#version 440
|
|
|
|
layout(location = 0) in vec4 position;
|
|
|
|
layout(std140, binding = 0) uniform buf {
|
|
mat4 mvp;
|
|
vec3 color0;
|
|
vec3 color1;
|
|
vec3 color2;
|
|
vec3 color3;
|
|
vec3 color4;
|
|
vec3 color5;
|
|
} ubuf;
|
|
|
|
out gl_PerVertex { vec4 gl_Position; };
|
|
|
|
void main()
|
|
{
|
|
gl_Position = ubuf.mvp * position;
|
|
}
|