Background for sprite

Hi, I’m trying to add a text sprite. Is it possible to add background color to THREE.Sprite ? Is it done in the SpriteMaterial or is there another method?


What you are trying to do is not possible.

In general, colors are not defined at 3D object level. SpriteMaterial allows to define a separate color value however this value is multiplied with the texels sampled from the respective texture. So it is not possible to have a separate background color.

Depending on how you generate your text sprites, you can solve this issue differently. E.g. when using 2D canvas, you can easily define a background color before drawing the text itself.

1 Like