RetroArch/reference/opt/shaders/frag/constant-composites.frag
aliaspider 501fd33b68 Squashed 'deps/SPIRV-Cross/' content from commit d4b0625cbd
git-subtree-dir: deps/SPIRV-Cross
git-subtree-split: d4b0625cbd7377e720b4fa1d63e6a3c09da5db63
2018-02-02 11:53:59 +01:00

24 lines
425 B
GLSL

#version 310 es
precision mediump float;
precision highp int;
struct Foo
{
float a;
float b;
};
layout(location = 0) out vec4 FragColor;
layout(location = 0) flat in mediump int _line;
float lut[4];
Foo foos[2];
void main()
{
lut = float[](1.0, 4.0, 3.0, 2.0);
foos = Foo[](Foo(10.0, 20.0), Foo(30.0, 40.0));
FragColor = vec4(lut[_line]);
FragColor += vec4(foos[_line].a * (foos[1 - _line].a));
}