examples icon indicating copy to clipboard operation
examples copied to clipboard

Spine example page looks bad on Windows

Open JCash opened this issue 2 years ago • 2 comments

The example looks jagged, suggesting it gets the wrong size or something. https://defold.com/examples/animation/spine/

Looks good on macOS (Firefox): Screenshot 2023-09-13 at 09 47 20

But poor on Windows (Edge) (blurriness may be to transferring image over chat): Notized the jagged lines, which are even more jarring when animating. image

JCash avatar Sep 13 '23 07:09 JCash

This issue is how to tell everyone that you have a Mac Retina without saying that you have a Mac Retina 😄

The reason is because last year all materials have mipmapping disabled by default. And the original model just has HUGE sized sprites and very thin lines. When scaled down we see linear filtering issues. On high dpi devices it's not so noticeable, but on old low dpi displays of course there will be a hard “ladder”.

But if we turn on mipmapping, we will see blurred lines.

We use two solutions in our games:

  • sample from the mipmap above, like texture2D(texture_sampler, var_texcoord0.xy, -1.0)
  • use RGSS (a cool algorithm by Ben Golus, available in the Sharp Sprite asset).

How to solve this for this example? Maybe just pre-scale down the atlas size?

aglitchman avatar Oct 11 '24 15:10 aglitchman

Maybe just pre-scale down the atlas size?

Sounds good!

AGulev avatar Oct 12 '24 14:10 AGulev