SPIRV-Cross/reference/opt/shaders-msl/frag/16bit-constants.frag
Chip Davis ca4744ab72 Support constants of 16-bit integral type in GLSL and MSL.
Constants of 8-bit type aren't supported in GLSL, since there's no
extension letting you use them.
2018-11-02 14:39:55 -05:00

22 lines
306 B
GLSL

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct main0_out
{
half foo [[color(0)]];
short bar [[color(1)]];
ushort baz [[color(2)]];
};
fragment main0_out main0()
{
main0_out out = {};
out.foo = 1.0h;
out.bar = 2;
out.baz = 3u;
return out;
}