summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/texCubeShadow-outES3Metal.txt
blob: e98663c919c69fcbeefead608aa26aa93cae3690 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <metal_stdlib>
#pragma clang diagnostic ignored "-Wparentheses-equality"
using namespace metal;
constexpr sampler _mtl_xl_shadow_sampler(address::clamp_to_edge, filter::linear, compare_func::less);
struct xlatMtlShaderInput {
  half4 uv;
};
struct xlatMtlShaderOutput {
  half4 _fragColor [[color(0)]];
};
struct xlatMtlShaderUniform {
};
;
fragment xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]]
  ,   depthcube<float> shadowmap [[texture(0)]], sampler _mtlsmp_shadowmap [[sampler(0)]])
{
  xlatMtlShaderOutput _mtl_o;
  half4 tmpvar_1;
  tmpvar_1 = half4(shadowmap.sample_compare(_mtl_xl_shadow_sampler, (float3)(_mtl_i.uv).xyz, (_mtl_i.uv).w));
  _mtl_o._fragColor = tmpvar_1;
  return _mtl_o;
}


// stats: 0 alu 1 tex 0 flow
// inputs: 1
//  #0: uv (medium float) 4x1 [-1]
// textures: 1
//  #0: shadowmap (low cube) 0x0 [-1] loc 0