uinosoft / t3d.js

ThingJS 3D Engine (t3d) is a lightweight, web-first, and extendable 3D rendering library.
BSD 3-Clause "New" or "Revised" License
184 stars 23 forks source link

how to render msdf text? #21

Closed russelgal closed 11 months ago

shawn0326 commented 11 months ago

For real-time rendering, please refer to this example: https://uinosoft.github.io/t3d.js/examples/#text_sdf. If you're asking about generating MSDF text resources, you can utilize third-party libraries such as: https://github.com/leochocolat/three-msdf-text-utils.

russelgal commented 11 months ago

but the texture of one character is simply rendered there https://uinosoft.github.io/t3d.js/examples/#text_sdf what about the strings? tried to adapt classes from https://github.com/leochocolat/three-msdf-text-utils to t3d.js - unsuccessfully // so far I am an absolute beginner in webgl

shawn0326 commented 11 months ago

https://github.com/leochocolat/three-msdf-text-utils

Seems like a great solution. Thanks for sharing. However, porting it to t3d might take some time.

russelgal commented 11 months ago

any ETA of msdf font/text shader? )

shawn0326 commented 11 months ago

Maybe add a example in the next week or two.

shawn0326 commented 11 months ago

merged to dev: https://uinosoft.github.io/t3d.js/examples/#text_bitmap @russelgal