Hi guys. Sorry to butt-in. Shurp… check this out… https://www.babylonjs-playground.com/#11JINV#58
There are some GUI fonts that are continuously being re-painted with blocks of random colors. It is VERY slow, of course. Line 209 repeatedly calls paintIt(). In paintIt() line 180, it checks the (a)lpha of each color4 pixel on the ‘texture’. If NOT alpha = 0 (transparent)… then I randomly color.
I believe I TRIED to map a standard texture… into the fonts… and I believe I hit a security wall. I did this playground a long time ago… and I forgot things. But, it is a good playground to experiment-with. See this link… for information/spec about what can/can’t be done… on a context2d canvas.
Here’s a playground that draws some text on a ground texture: https://www.babylonjs-playground.com/#16Z24R#17 It doesn’t use dynamicTexture’s handy drawText feature, but it still does fine.
A playground search for ‘drawText’ finds MANY examples.
Here’s one of those examples… https://www.babylonjs-playground.com/#1390ZN#6 (see line 46). The drawText feature of dynamicTextures… sort-of “automates” much of the activity done with the previous #17 playground (code lines 17-33).
Ok, I’ll butt-out, now. I hope I have been helpful. You have more tools to blow-up stuff-with, now.
For @nasimiasl … Hello, my shader-God friend. Would you know-of a way to fill all white text in this PG #64… with a single picture/image? That would be sweet! Static image is fine, but extra credit for animated png, or video, or renderTargetTexture fills. Thanks for your (or ANYONE’S) thoughts/ideas.