msdf-error-correction.h 776 B

1234567891011121314151617181920
  1. #pragma once
  2. #include "Vector2.h"
  3. #include "Projection.h"
  4. #include "BitmapRef.hpp"
  5. #define MSDFGEN_DEFAULT_ERROR_CORRECTION_THRESHOLD 1.001
  6. namespace msdfgen {
  7. /// Attempts to patch multi-channel signed distance field values that may cause interpolation artifacts. (Already called by generateMSDF)
  8. void msdfErrorCorrection(const BitmapRef<float, 3> &output, const Vector2 &threshold);
  9. void msdfErrorCorrection(const BitmapRef<float, 4> &output, const Vector2 &threshold);
  10. // Alternate API - threshold specified in pixels
  11. void msdfErrorCorrection(const BitmapRef<float, 3> &output, double threshold, const Projection &projection, double range);
  12. void msdfErrorCorrection(const BitmapRef<float, 4> &output, double threshold, const Projection &projection, double range);
  13. }