SPIRV-Cross/shaders/legacy/vert/struct-varying..legacy.vert
Hans-Kristian Arntzen 97350d32fd Fix cases for flattened struct write.
Handle writing the entire struct as well as writing the elements
individually.
2017-02-23 19:05:11 +01:00

24 lines
334 B
GLSL

#version 310 es
struct Output
{
vec4 a;
vec2 b;
};
layout(location = 0) out Output vout;
void main()
{
Output s = Output(vec4(0.5), vec2(0.25));
// Write whole struct.
vout = s;
// Write whole struct again, checks for scoping.
vout = s;
// Write elements individually.
vout.a = s.a;
vout.b = s.b;
}