SPIRV-Cross/reference/shaders/frag/ubo_layout.frag
Hans-Kristian Arntzen e67f6f85a4 Defer parenthesis generation until needed.
Previously, we would generate parentheses proactively when generating
binary ops, however, this leads to uglier code and hits warnings in
compilers when used as a conditional.
2016-12-05 10:56:54 +01: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];
}