SPIRV-Cross/reference/opt/shaders/frag/ubo_layout.frag
Hans-Kristian Arntzen aac6885950 GLSL: Be more aggressive about using type_alias.
To facilitate an improved linking-by-name use case for older GL,
we will be more aggressive about merging struct definitions, even for
rather unrelated cases where we don't strictly need to use type aliases.
2020-07-29 12:48:41 +02:00

27 lines
352 B
GLSL

#version 310 es
precision mediump float;
precision highp int;
struct Str
{
mat4 foo;
};
layout(binding = 0, std140) uniform UBO1
{
layout(row_major) Str foo;
} ubo1;
layout(binding = 1, std140) uniform UBO2
{
Str foo;
} ubo0;
layout(location = 0) out vec4 FragColor;
void main()
{
FragColor = ubo1.foo.foo[0] + ubo0.foo.foo[0];
}