I’m using three-bmfont-text and MSDF font to create high-performance letter animations. The antialiasing is awesome, but when the letters overlap each other, you can notice a borderline.
Is there a way to fix this? Do you know what’s happening? I think it’s something related to alpha multiplier… don’t know if I can choose another blend mode like SCREEN or MAXIMUM.
As the idea is to record screen to create some short videos, I can do a little trick like blurring a little bit and changing levels to get rid of this line, but I would like to solve this issue using Three.JS only.
@marlus a couple of lines of code is rarely enough to go on. Please provide a complete example using codepen or something similar. You can use this as a template:
I’m only seeing a black screen. There’s a couple of errors in the console related to images:
Failed to load resource: the server responded with a status of 404 (Not Found)
host.marlus.com/glitch/Beatrice-SemiBold.png:1 Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID
host.marlus.com/glitch/Beatrice-SemiBold.png:1 GET https://host.marlus.com/glitch/Beatrice-SemiBold.png net::ERR_CERT_COMMON_NAME_INVALID
Maybe it will work if you move the images to glitch?
Hmm, I’m not sure what’s going on there. A couple of things I would reccomend before trying to debug this further:
update three.js r70 -> r109
don’t use the three-orbit-viewer, it hasn’t been updated in 5 years. Use OrbitControls instead - you can use the misc_controls_orbit example as a template, or just skip controls since they don’t add much to this example
If you do both of these and the problem persists, it’s probably the shader. You are setting material.transparent = controls.aliasing which is kind of a red flag.
So I created some random offset in main.js on 127 line
text.translateZ(Math.random())
after that result become more predictable, but appears on some letters. Just change Math.random() to index/255 where index is some unique index of letter.