SPIRV-Cross/reference/shaders-msl/frag/packed-expression-vector-shuffle.frag
Hans-Kristian Arntzen f65120c147 Deal with packed expressions in more scenarios.
Make a new "to_extract_component_expression" helper.
2018-05-25 10:57:02 +02:00

26 lines
402 B
GLSL

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct UBO
{
packed_float3 color;
float v;
};
struct main0_out
{
float4 FragColor [[color(0)]];
};
fragment main0_out main0(constant UBO& _15 [[buffer(0)]])
{
main0_out out = {};
float4 f = float4(1.0);
f = float4(_15.color[0], _15.color[1], _15.color[2], f.w);
out.FragColor = f;
return out;
}