#include <metal_stdlib>

using namespace metal;
float4 textureSampleBias_53b9f7(texturecube<float, access::sample> tint_symbol, sampler tint_symbol_1) {
  float3 arg_2 = float3(1.0f);
  float arg_3 = 1.0f;
  float4 res = tint_symbol.sample(tint_symbol_1, arg_2, bias(arg_3));
  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) = textureSampleBias_53b9f7(tint_symbol_3, tint_symbol_4);
  return;
}

