mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 17:18:12 -05:00
26 lines
803 B
Text
26 lines
803 B
Text
#include <metal_stdlib>
|
|
using namespace metal;
|
|
struct xlatMtlShaderInput {
|
|
float2 varUV;
|
|
};
|
|
struct xlatMtlShaderOutput {
|
|
half4 _fragData [[color(0)]];
|
|
};
|
|
struct xlatMtlShaderUniform {
|
|
};
|
|
fragment xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]]
|
|
, texture2d<float> _CameraDepthTexture [[texture(0)]], sampler _mtlsmp__CameraDepthTexture [[sampler(0)]])
|
|
{
|
|
xlatMtlShaderOutput _mtl_o;
|
|
float4 tmpvar_1;
|
|
tmpvar_1 = _CameraDepthTexture.sample(_mtlsmp__CameraDepthTexture, (float2)(_mtl_i.varUV), level(0.0)).xxxx;
|
|
_mtl_o._fragData = half4(tmpvar_1);
|
|
return _mtl_o;
|
|
}
|
|
|
|
|
|
// stats: 0 alu 1 tex 0 flow
|
|
// inputs: 1
|
|
// #0: varUV (high float) 2x1 [-1]
|
|
// textures: 1
|
|
// #0: _CameraDepthTexture (high 2d) 0x0 [-1] loc 0
|