#include <metal_stdlib>
using namespace metal;

struct tint_module_vars_struct {
  device packed_float3* prevent_dce;
};

float3 fwidthFine_523fdc() {
  float3 const v = dfdx(float3(1.0f));
  float3 const v_1 = dfdy(float3(1.0f));
  float3 const v_2 = abs(v);
  float3 res = (v_2 + abs(v_1));
  return res;
}

fragment void fragment_main(device packed_float3* prevent_dce [[buffer(0)]]) {
  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
  (*tint_module_vars.prevent_dce) = packed_float3(fwidthFine_523fdc());
}
