As mentioned multiple times, bitmap fonts are the fastest way to render text in Starling. However, if you need to display text in multiple sizes, you will soon discover that bitmap fonts do not scale well. Scaling up makes them blurry, scaling down introduces aliasing problems. Thus, for best results, one has to embed the font in all the sizes used within the application…
Did you use a plugin? It doesn’t appear to provide bitmap font support natively.
.
Can you please discuss the issue of contour hardness for “GlowFilter”
.
A friend once replied to me saying that the transparency value of “GlowFilter” should not exceed 1, but “html5” worked for some reason.
.
I just looked at the ‘Starling API’ and the documentation suggests that we do this if we need to implement hard tracing.
.
.
This filter can also be used to create outlines around objects. The trick is to assign an alpha value that’s (much) greater than 1.0, and full resolution. For example, the following code will yield a nice black outline:
.
object.filter = new GlowFilter(0x0, 30, 1, 1.0);
.
“starling api”, The transparency of the case has been increased to 30 to obtain hardness strokes
.
The GlowFilter class lets you apply a glow effect to display objects. It is similar to the drop shadow filter with the distance and angle properties set to 0.
This filter can also be used to create outlines around objects. The trick is to assign an alpha value that’s (much) greater than 1.0 , and full resolution. For example, the following code will yield a nice black outline:
object.filter = new GlowFilter(0x0, 30, 1, 1.0);
Set ‘alpha’ to ‘30’,
This can achieve a ‘hard contour tracing’,
I would like to ask how this effect is achieved internally,
Have multiple filters been used?
How is this effect achieved internally?
Have multiple overlay filters been used to achieve this?
This steps into GPU shader assembly, which is another world, and may as well be a foreign language to me
From what I can understand of it though, the starling.filters.CompositeFilter class which the GlowFilter is leveraging, does not clamp the alpha value, so values higher than 1.0 are possible, and even useful.
What’s pushed to the fragmentShader, is the colour value multiplied by the alpha, which I guess when greater than 1.0 in shader land, simply increases intensity.
Something that’s quite common in games though, much like Roof Rage above, is preserving that vintage pixel effect.
That can give you some breathing space as far as resolutions go, allowing you to scale up content on higher resolutions devices, whilst preserving the pixel look and maintaining modestly sized assets.