Logo
Explore Help
Sign In
northern-lighthouse/godot
1
0
Fork 0
You've already forked godot
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
cf7e88f6ac0b5ace42df81a93cce8b51c17df960
godot/thirdparty/msdfgen/core/pixel-conversion.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
229 B
C++
Raw Normal View History

Makes FontData importable resource. Adds multi-channel SDF font texture generation and rendering support. Adds per-font oversampling support. Adds FontData import plugins (for dynamic fonts, BMFonts and monospaced image fonts), font texture cache pre-generation and loading. Adds BMFont binary format and outline support.
2020-12-27 15:30:33 +02:00
#pragma once
#include "arithmetics.hpp"
namespace msdfgen {
inline byte pixelFloatToByte(float x) {
msdfgen: Update to 1.12
2025-01-09 21:16:08 +01:00
return byte(~int(255.5f-255.f*clamp(x)));
Makes FontData importable resource. Adds multi-channel SDF font texture generation and rendering support. Adds per-font oversampling support. Adds FontData import plugins (for dynamic fonts, BMFonts and monospaced image fonts), font texture cache pre-generation and loading. Adds BMFont binary format and outline support.
2020-12-27 15:30:33 +02:00
}
inline float pixelByteToFloat(byte x) {
return 1.f/255.f*float(x);
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.1 Page: 634ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API