SPIRV-Cross/shaders-msl/frag/mrt-array.frag

25 lines
391 B
GLSL
Raw Normal View History

2018-03-13 12:17:17 +00:00
#version 310 es
precision mediump float;
layout(location = 0) out vec4 FragColor[4];
layout(location = 0) in vec4 vA;
layout(location = 1) in vec4 vB;
2018-03-13 13:03:35 +00:00
void write_deeper_in_function()
{
FragColor[3] = vA * vB;
}
void write_in_function()
{
FragColor[2] = vA - vB;
write_deeper_in_function();
}
2018-03-13 12:17:17 +00:00
void main()
{
FragColor[0] = mod(vA, vB);
FragColor[1] = vA + vB;
2018-03-13 13:03:35 +00:00
write_in_function();
2018-03-13 12:17:17 +00:00
}