0 Favourites

[r184] weird linear filtering on tilemap

  • Problem Description

    I use "Point" mode for Sampling , and have a weird linear filtering on tilemap, and not in sprite.

    Attach a Capx

    See the attachement

    Description of Capx

    2 Sprites and a TileMap with two tile exactly the same as the sprites.

    Steps to Reproduce Bug

    • Put "Point" in Sampling , a Tilemap

    Observed Result

    Linear filtering on the tilemap , and nothing on sprites.

    If you put Webgl to Off, no linear filtering on tilemap.

    Expected Result

    No lienar filtering on tilemap.

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer: don't know
    • Node Webkit: YES

    Operating System and Service Pack

    win7 x64 sp1

    Construct 2 Version ID

    Construct 2 Release 184

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • I think this is not a bug, this the popular power of the 2 problem, I believe this is applicable in all tile based plugin. Get your dimension in the power of 2, see if that helps.

  • Can't see anything wrong here, top and bottom look identical in Chrome. Can you show screenshots?

  • Sampling to "Point"

    Tiles are 40*40

    Without "Webgl"

    With "Webgl"

  • Oh right, your .capx already had WebGL turned off so it was showing it working correctly instead of the error condition. That caught me out. I can reproduce if turning on WebGL.

    If you have 'seamless' mode off then the tilemap will run in tiling mode which due to the way WebGL works can only deal with power-of-two tile sizes (your tile size is 120x160, the nearest power-of-two size is 128x128). Since it's not a power-of-two it has to first stretch it to power-of-two then draw that, and the stretching is where the "glitch" comes from.

    If you turn 'seamless' mode on then it doesn't tile anything so the power-of-two limitation does not apply, but it still happens. This is indeed a bug because it's stretching to power-of-two sizes (which degrades quality) when it doesn't need to. This is fixed for the next build.

    tl;dr - in the next beta turn 'seamless' mode on and it's fixed. It can't be worked around at the moment with seamless mode off.

  • ok, thks

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)