jME-TTF - Blurred Text
You can obtain a texture with blurred text via the
BlurText or
BlurTextBMP class. For mesh texts,
TrueTypeMesh, you'll use the
BlurText class and for bitmap texts,
TrueTypeBMP, you'll use the
BlurTextBMP class:
com.jme3.font.Rectangle textBox = new com.jme3.font.Rectangle(0, 0, 256, 256);
StringContainer sc = new StringContainer(ttf, "Hello World", 0, textBox);
BlurText bt = new BlurText(assetManager, renderMangager, sc,
5, 1, 2.5f, new ColorRGBA(0.02f, 0.4f, 1, 1));
Texture2D tex = bt.render();
The
BlurText constructor takes in the
AssetManager,
RenderManager, a
StringContainer, the number of desired passes, the desired pass offset, an intensity and color. The pass offset can be used to artificially extend the radius of the blur at the cost of quality.
Designed by Adam T. Ryder