mirror of
https://github.com/libretro/RetroArch
synced 2025-02-09 00:40:09 +00:00
501fd33b68
git-subtree-dir: deps/SPIRV-Cross git-subtree-split: d4b0625cbd7377e720b4fa1d63e6a3c09da5db63
32 lines
522 B
GLSL
32 lines
522 B
GLSL
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct Foo
|
|
{
|
|
float a;
|
|
float b;
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
int line [[user(locn0)]];
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float4 FragColor [[color(0)]];
|
|
};
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]])
|
|
{
|
|
main0_out out = {};
|
|
float lut[4] = {1.0, 4.0, 3.0, 2.0};
|
|
Foo foos[2] = {{10.0, 20.0}, {30.0, 40.0}};
|
|
out.FragColor = float4(lut[in.line]);
|
|
out.FragColor += float4(foos[in.line].a * (foos[1 - in.line].a));
|
|
return out;
|
|
}
|
|
|