mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 17:18:12 -05:00
26 lines
650 B
Text
26 lines
650 B
Text
|
#include <metal_stdlib>
|
||
|
using namespace metal;
|
||
|
struct xlatMtlShaderInput {
|
||
|
float3 uv;
|
||
|
};
|
||
|
struct xlatMtlShaderOutput {
|
||
|
half4 _fragColor [[color(0)]];
|
||
|
};
|
||
|
struct xlatMtlShaderUniform {
|
||
|
};
|
||
|
;
|
||
|
fragment xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]]
|
||
|
, texture3d<half> tex [[texture(0)]], sampler _mtlsmp_tex [[sampler(0)]])
|
||
|
{
|
||
|
xlatMtlShaderOutput _mtl_o;
|
||
|
_mtl_o._fragColor = tex.sample(_mtlsmp_tex, (float3)(_mtl_i.uv));
|
||
|
return _mtl_o;
|
||
|
}
|
||
|
|
||
|
|
||
|
// stats: 0 alu 1 tex 0 flow
|
||
|
// inputs: 1
|
||
|
// #0: uv (high float) 3x1 [-1]
|
||
|
// textures: 1
|
||
|
// #0: tex (low 3d) 0x0 [-1] loc 0
|