#include <metal_stdlib>

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

float3 fwidthFine_523fdc() {
  float3 res = tint_fwidth_fine(float3(1.0f));
  return res;
}

fragment void fragment_main(device packed_float3* tint_symbol [[buffer(0)]]) {
  *(tint_symbol) = packed_float3(fwidthFine_523fdc());
  return;
}

