Add texture to a text ?

Hello all,

what is the best way to add texture to a text ?

Thank you

you can add a background to your text easily enough, but if you’re talking about any kind of 3D effect, you may need a shader. Do you have an example of what you want?

Thank you to answer me @Ignatz

I use sprite() or mesh() is this the right solution?

Why dont you create the alphabet as png images and then just use sprite function?

My Fps is very bad with sprite() function

@Diablo, @juaxix is correct and just make the letters in a paint package.

If your FPS is an issue, prep them all as a spritesheet/atlas and use a mesh with texture coords to select the letters you need per word. This is the fastest way, although a bit more long-winded to set-up. :slight_smile:

For more simple ‘text with texture’ effect… Have you tried the new blend modes? There should be a way of simply multiplying a ‘white’ (255,255,255,255) version of your text with your texture. This should (in theory) simply only show the texture where the letters are peak white. This works in other packages (e.g. Photoshop/After Effect) and cant see why this approach shouldn’t work in Codea.