1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-31 18:41:20 +00:00

msdfgen: Update to 1.13

Remove unused `export-svg` and `save-*` files.
This commit is contained in:
Rémi Verschelde
2025-12-12 22:39:53 +01:00
parent 08e6cd181f
commit 76dda1f2c8
43 changed files with 807 additions and 1041 deletions

View File

@@ -12,7 +12,7 @@ static float distVal(float dist, DistanceMapping mapping) {
return (float) clamp(mapping(dist)+.5);
}
void renderSDF(const BitmapRef<float, 1> &output, const BitmapConstRef<float, 1> &sdf, Range sdfPxRange, float sdThreshold) {
void renderSDF(const BitmapSection<float, 1> &output, const BitmapConstSection<float, 1> &sdf, Range sdfPxRange, float sdThreshold) {
Vector2 scale((double) sdf.width/output.width, (double) sdf.height/output.height);
if (sdfPxRange.lower == sdfPxRange.upper) {
for (int y = 0; y < output.height; ++y) {
@@ -37,7 +37,7 @@ void renderSDF(const BitmapRef<float, 1> &output, const BitmapConstRef<float, 1>
}
void renderSDF(const BitmapRef<float, 3> &output, const BitmapConstRef<float, 1> &sdf, Range sdfPxRange, float sdThreshold) {
void renderSDF(const BitmapSection<float, 3> &output, const BitmapConstSection<float, 1> &sdf, Range sdfPxRange, float sdThreshold) {
Vector2 scale((double) sdf.width/output.width, (double) sdf.height/output.height);
if (sdfPxRange.lower == sdfPxRange.upper) {
for (int y = 0; y < output.height; ++y) {
@@ -67,7 +67,7 @@ void renderSDF(const BitmapRef<float, 3> &output, const BitmapConstRef<float, 1>
}
}
void renderSDF(const BitmapRef<float, 1> &output, const BitmapConstRef<float, 3> &sdf, Range sdfPxRange, float sdThreshold) {
void renderSDF(const BitmapSection<float, 1> &output, const BitmapConstSection<float, 3> &sdf, Range sdfPxRange, float sdThreshold) {
Vector2 scale((double) sdf.width/output.width, (double) sdf.height/output.height);
if (sdfPxRange.lower == sdfPxRange.upper) {
for (int y = 0; y < output.height; ++y) {
@@ -91,7 +91,7 @@ void renderSDF(const BitmapRef<float, 1> &output, const BitmapConstRef<float, 3>
}
}
void renderSDF(const BitmapRef<float, 3> &output, const BitmapConstRef<float, 3> &sdf, Range sdfPxRange, float sdThreshold) {
void renderSDF(const BitmapSection<float, 3> &output, const BitmapConstSection<float, 3> &sdf, Range sdfPxRange, float sdThreshold) {
Vector2 scale((double) sdf.width/output.width, (double) sdf.height/output.height);
if (sdfPxRange.lower == sdfPxRange.upper) {
for (int y = 0; y < output.height; ++y) {
@@ -119,7 +119,7 @@ void renderSDF(const BitmapRef<float, 3> &output, const BitmapConstRef<float, 3>
}
}
void renderSDF(const BitmapRef<float, 1> &output, const BitmapConstRef<float, 4> &sdf, Range sdfPxRange, float sdThreshold) {
void renderSDF(const BitmapSection<float, 1> &output, const BitmapConstSection<float, 4> &sdf, Range sdfPxRange, float sdThreshold) {
Vector2 scale((double) sdf.width/output.width, (double) sdf.height/output.height);
if (sdfPxRange.lower == sdfPxRange.upper) {
for (int y = 0; y < output.height; ++y) {
@@ -143,7 +143,7 @@ void renderSDF(const BitmapRef<float, 1> &output, const BitmapConstRef<float, 4>
}
}
void renderSDF(const BitmapRef<float, 4> &output, const BitmapConstRef<float, 4> &sdf, Range sdfPxRange, float sdThreshold) {
void renderSDF(const BitmapSection<float, 4> &output, const BitmapConstSection<float, 4> &sdf, Range sdfPxRange, float sdThreshold) {
Vector2 scale((double) sdf.width/output.width, (double) sdf.height/output.height);
if (sdfPxRange.lower == sdfPxRange.upper) {
for (int y = 0; y < output.height; ++y) {
@@ -173,19 +173,19 @@ void renderSDF(const BitmapRef<float, 4> &output, const BitmapConstRef<float, 4>
}
}
void simulate8bit(const BitmapRef<float, 1> &bitmap) {
void simulate8bit(const BitmapSection<float, 1> &bitmap) {
const float *end = bitmap.pixels+1*bitmap.width*bitmap.height;
for (float *p = bitmap.pixels; p < end; ++p)
*p = pixelByteToFloat(pixelFloatToByte(*p));
}
void simulate8bit(const BitmapRef<float, 3> &bitmap) {
void simulate8bit(const BitmapSection<float, 3> &bitmap) {
const float *end = bitmap.pixels+3*bitmap.width*bitmap.height;
for (float *p = bitmap.pixels; p < end; ++p)
*p = pixelByteToFloat(pixelFloatToByte(*p));
}
void simulate8bit(const BitmapRef<float, 4> &bitmap) {
void simulate8bit(const BitmapSection<float, 4> &bitmap) {
const float *end = bitmap.pixels+4*bitmap.width*bitmap.height;
for (float *p = bitmap.pixels; p < end; ++p)
*p = pixelByteToFloat(pixelFloatToByte(*p));