#include <metal_stdlib>

using namespace metal;
float2 tint_fwidth_fine(float2 v) {
  return (fabs(dfdx(v)) + fabs(dfdy(v)));
}

void fwidthFine_ff6aa0(device float2* const tint_symbol) {
  float2 res = tint_fwidth_fine(float2(1.0f));
  *(tint_symbol) = res;
}

fragment void fragment_main(device float2* tint_symbol_1 [[buffer(0)]]) {
  fwidthFine_ff6aa0(tint_symbol_1);
  return;
}

