[r184] weird linear filtering on tilemap

Bugs will be moved here once resolved.

Post » Fri Oct 10, 2014 9:16 am

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
You do not have the required permissions to view the files attached to this post.
B
38
S
13
G
4
Posts: 152
Reputation: 5,147

Post » Fri Oct 10, 2014 11:30 am

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.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Fri Oct 10, 2014 2:05 pm

Can't see anything wrong here, top and bottom look identical in Chrome. Can you show screenshots?
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635

Post » Fri Oct 10, 2014 2:19 pm

Sampling to "Point"
Tiles are 40*40

Without "Webgl"
Image


With "Webgl"
Image
B
38
S
13
G
4
Posts: 152
Reputation: 5,147

Post » Fri Oct 10, 2014 4:58 pm

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.
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635

Post » Fri Oct 10, 2014 5:29 pm

ok, thks
B
38
S
13
G
4
Posts: 152
Reputation: 5,147


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests