#include <metal_stdlib>

using namespace metal;
float textureSampleCompare_63fb83(depthcube<float, access::sample> tint_symbol, sampler tint_symbol_1) {
  float3 arg_2 = float3(1.0f);
  float arg_3 = 1.0f;
  float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3);
  return res;
}

fragment void fragment_main(device float* tint_symbol_2 [[buffer(0)]], depthcube<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
  *(tint_symbol_2) = textureSampleCompare_63fb83(tint_symbol_3, tint_symbol_4);
  return;
}

