[R68] Tiled backgrounds black in WebGL

Bugs will be moved here once resolved.

Post » Thu Nov 17, 2011 11:34 pm

Yeah i think so. The problem would be to adapt Tiled BG to work with it. Depending on how Ash implemented it it would be more or less difficult. If one day WebGL renderer were to be default, since WebGL doesn't like npot textures the best option would be to pack all game images into pot textures. Infact i've seen an engine that uses WebGL that packs every image you import into a single big pot texture. Of course there should be a limit to this.
B
58
S
13
G
10
Posts: 632
Reputation: 12,505

Post » Fri Nov 18, 2011 12:12 am

@Kiyoshi, that's what I meant in my post :) The engine will scale it up to the next power of two size for you. It's already done for the next build, it's a simple few lines of code, but it does have the side effect that it looks a bit blurry compared to if it didn't have to scale it up. It's a limitation in WebGL itself - they want to make sure it works identically even on old mobile phones with low-tech graphics cards.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Fri Nov 18, 2011 1:31 am

Great! But do you mean scale it or resize it ? Because resizing it it shouldn't get blurry at all. It may seem confusing since saying it like this one could confound one with the other :) Thinking about it now scaling it wouldn't make any sense since it would make sprites very blurryKiyoshi2011-11-18 01:35:48
B
58
S
13
G
10
Posts: 632
Reputation: 12,505

Post » Fri Nov 18, 2011 1:35 am

Scaling and resizing mean the same thing... if you mean using a point filter, that might work, but only if the game itself is also set to use point filtering - if linear filtering is used anywhere it will still look blurry.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Fri Nov 18, 2011 1:47 am

Well i may be misunderstanding it but i mean it like this :

Original size is 96x96

http://dl.dropbox.com/u/2472278/Images/rescale.png
http://dl.dropbox.com/u/2472278/Images/enlarge.pngKiyoshi2011-11-18 01:49:00
B
58
S
13
G
10
Posts: 632
Reputation: 12,505

Post » Fri Nov 18, 2011 4:31 am

Does this mean the texture will get bigger also?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Fri Nov 18, 2011 1:16 pm

Yes
B
58
S
13
G
10
Posts: 632
Reputation: 12,505

Post » Fri Nov 18, 2011 3:35 pm

If you do what you did in the 'enlarge' picture, then the empty space will be tiled as well!
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Fri Nov 18, 2011 6:40 pm

Yeah i know :( Since you can't manipulate uv's to get right part of texture and than change uv again to draw it with texture repeat in the same call that's a problem. Puff, my brain exploded :)
B
58
S
13
G
10
Posts: 632
Reputation: 12,505

Previous

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest