invisible sprite bug, legacy ati cards

Bugs will be moved here once resolved.

Post » Mon May 18, 2015 6:19 pm

Problem Description
On older ati cards (ones that you can't get a driver for newer than 2010) sprites with non-power of two textures become invisible when you make them smaller.

Attach a Capx
https://dl.dropboxusercontent.com/u/542 ... e_ati.capx
Note: this is a ati driver bug so you likely can't reproduce.

Description of Capx
This just a sprite with a 200x200 texture resized to 50x50. The result on my radeon x1200 series card is the sprite is invisible.

Steps to Reproduce Bug
  • Step 1: Create sprite with a non power of two texture size.
  • Step 2: Resize the sprite smaller till it fades to invisible

Observed Result
When in the editor and I resize a sprite that has a non-power of two texture, it becomes invisible after shrinking it to a certain size.

Expected Result
I would expect the sprite to not become invisible.

Affected Browsers
N/A, it is a editor issue.

Operating System and Service Pack
Windows vista sp2

Construct 2 Version ID
r205 32bit

Proposed Solution
The bug has been reported a few times before and always has been closed as a driver bug, which is understandable since something like this is near impossible without being able to reproduce it. But recently I was working on something else in opengl where stuff was invisible and found the cause and a solution.

Basically the mipmaps aren't being created when using glGenerateMipmap due to an ati driver bug. Usually the solution is to update the drivers but that is impossible on cards like mine. I then stumbled upon this which gives a solution that worked for what I was working on.
https://www.opengl.org/wiki/Common_Mist ... generation
Warning: It has been reported that on some ATI drivers, glGenerateMipmap(GL_TEXTURE_2D) has no effect unless you precede it with a call to glEnable(GL_TEXTURE_2D) in this particular case. Once again, to be clear, bind the texture, glEnable, then glGenerateMipmap. This is a bug and has been in the ATI drivers for a while. Perhaps by the time you read this, it will have been corrected. (glGenerateMipmap doesn't work on ATI as of 2011)
B
92
S
32
G
109
Posts: 5,294
Reputation: 70,999

Post » Tue May 19, 2015 10:14 am

Well, there would be nothing I can do, but since you pointed to a possible solution I dropped in an extra glEnable call as described. Hopefully it won't break any new drivers. I can't test this works at all since I don't have any ATI hardware, but it's in the next beta, so let me know if it works.
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635

Post » Tue May 19, 2015 6:41 pm

Thanks for the quick fix, but unfortunately I just tested the update and there's no change, the sprite still becomes invisible. So I guess that wasn't the issue in this case. Still it was worth a shot anyway.
B
92
S
32
G
109
Posts: 5,294
Reputation: 70,999

Post » Tue May 19, 2015 8:01 pm

@R0J0hound , @Ashley
I have the same problem that sometimes occurs .(on i7-990X/12Gb/GTX970)
For some reason , the problem is gone there a few days by causing changes to the layer .
Note: The issue occurred on a common layer has several layout (HUD layer)
Image Image
B
25
S
14
G
137
Posts: 876
Reputation: 71,505

Post » Tue May 19, 2015 9:01 pm

Well, that doesn't surprise me, old terrible drivers are old and terrible. I did exactly what the description said with a call to glEnable again. Must be something different...
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635

Post » Tue May 19, 2015 10:35 pm

@Ashley
It must be, but no worries, it's purely cosmetic and isn't too bothersome. I'll keep an eye out for a working solution though.

In regard to buggy drivers I read this post by a guy who worked on nvidia drivers for a bit. It turns out when they update the driver they not only fix bugs in the driver but they also make patches so games relying on the broken driver can still work. It's both fascinating and frightening.
http://www.gamedev.net/topic/666419-wha ... try5215019
B
92
S
32
G
109
Posts: 5,294
Reputation: 70,999


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 7 guests