mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-03-21 09:00:19 +00:00
27 lines
531 B
Metal
27 lines
531 B
Metal
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
|
|
struct CopyVertexOut {
|
|
float4 position [[position]];
|
|
float2 uv;
|
|
};
|
|
|
|
struct Textures
|
|
{
|
|
texture2d<uint, access::sample> texture;
|
|
sampler sampler;
|
|
};
|
|
|
|
struct FragmentOut {
|
|
uint stencil [[stencil]];
|
|
};
|
|
|
|
fragment FragmentOut fragmentMain(CopyVertexOut in [[stage_in]],
|
|
constant Textures &textures [[buffer(TEXTURES_INDEX)]]) {
|
|
FragmentOut out;
|
|
|
|
out.stencil = textures.texture.sample(textures.sampler, in.uv).r;
|
|
|
|
return out;
|
|
}
|