message: Add mask smoothing to the unlit path.
diff: @@ -6,6 +6,13 @@ void addEmissive(const MaterialInputs material, inout vec4 color) {
  #endif
  }
  +#if defined(BLEND_MODE_MASKED)
  +float computeMaskedAlpha(float a) {
  + // Use derivatives to smooth alpha tested edges
  + return (a - getMaskThreshold()) / max(fwidth(a), 1e-3) + 0.5;
  +}
  +#endif
  +
  /**
  * Evaluates unlit materials. In this lighting model, only the base color and
  * emissive properties are taken into account:
  @@ -24,7 +31,8 @@ vec4 evaluateMaterial(const MaterialInputs material) {
  vec4 color = material.baseColor;
  #if defined(BLEND_MODE_MASKED)
  - if (color.a < getMaskThreshold()) {
  + color.a = computeMaskedAlpha(color.a);
  + if (color.a <= 0.0) {
  discard;
  }
  #endif
  