[r195] Mip-Mapping usage threshold seems poorly implemented

0 favourites
  • 5 posts
From the Asset Store
A template which allows you to customise the controls of your game.
  • Problem Description

    Mip-Mapping seems to take effect way too early based only on the shortest side of a sprite when it would make more sense to use the longest side.

    Attach a Capx

    [attachment=0:djcl1l91][/attachment:djcl1l91]

    Description of Capx

    Run as is, observe terrible pixellation:

    Switch to Low downsampling and observe way better result (although not ideal):

    Steps to Reproduce Bug

    Use any Downsampling mode (Medium or High) that implements mip-mapping.

    Observed Result

    Mip-map appears to be picked poorly - based on the shortest edge of a sprite.

    Expected Result

    Mip-map should be picked based on the longest edge of a sprite.

    Affected Browsers

    • Chrome: (YES) Operating System and Service Pack Windows 7, 64bit Construct 2 Version ID r195
  • As far as I am aware, this is not a bug, but just how mipmap selection works in OpenGL. Mipmaps generally improve downscaling quality, but at extreme aspect ratios (such as 1/4 as wide but 4 times taller) it picks the lower dimension to select the mipmap, and the reduced quality becomes apparent.

    I don't think there's anything to be done here, it's just the normal working of OpenGL.

  • I don't think there's anything to be done here, it's just the normal working of OpenGL.

    So is the choice of which mipmap to use entirely up to OpenGL? Does C2 only supply the maps themselves or is there some additional information passed onto the renderer? I'd just like to know, since I haven't really encountered similarly poor results in any other software. And, clearly, the selection logic seems a little flawed, given the ugly results.

  • The generation and selection of mipmaps is controlled entirely by OpenGL.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Don't mean to bother you too much with all these questions, but may I ask what happens when setting the Downscaling quality option then - does it just switch some flags for the GL renderer?

    I noticed that there is a bias option when drawing a texture in OpenGL:

    "There is an optional third input parameter of the type float: bias. After calculating the appropriate level of detail for a texture with mipmaps the bias is added before the actual texture lookup operation is executed."

    Is this also being affected in any way or is it completely up to the browser?

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