#include <metal_stdlib>

using namespace metal;
float4 textureSample_e53267(texturecube<float, access::sample> tint_symbol, sampler tint_symbol_1) {
  float3 arg_2 = float3(1.0f);
  float4 res = tint_symbol.sample(tint_symbol_1, arg_2);
  return res;
}

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

