在使用TextMeshPro的时候遇到了字体黑底的问题,类似下图这样

当字体较大的时候表现正常,当缩小到一定程度就会出现黑底。这个情况让人第一时间就是怀疑SDF计算缩放的时候存在问题。在我们重新导出字体,调整图集字体大小以及Padding后,让SP/PD值差不多大于3%就能解决这个问题

这个SP/PD就是Padding值/Samping Point Size
Also, note the SP/PD ratio. The generator calculates this by dividing the Sampling Point Size by the Padding Value. For best results, this value should be under 10%. If it’s above 10%, either increase the Atlas Resolution or decrease the Padding value, then regenerate the font until the value is below 10%.
上面说到SP/PD值应该低于10%,这个是从节省图集大小来考虑

最低0.47元/天 解锁文章
8276





