Image Filtering

About Monkey 2 Forums Monkey 2 Programming Help Image Filtering

This topic contains 7 replies, has 6 voices, and was last updated by  ImmutableOctet 2 years, 10 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2397

    peterigz
    Participant

    I’ve noticed that images rendered in monkey2 seem a little more blurry then I’m used to like there’s too much filtering going on. I’ve tried with and without the filter and mipmap flags when loading the image but it doesn’t seem to make any difference. Also setting TextureFilteringEnabled to false on the canvas doesn’t seem to make a difference either. See below for image to compare with Blitzmax which I think looks a lot better and “cripser”. You may not think there’s much difference but it is quite apparent to me 🙂

    (left is monkey2)
    Blurry image

    Is there anything I can check or try to get things looking more crisper?

    #2398

    wiebow
    Participant

    TextureFilteringEnabled set to false should make a huge difference. You need to call it at each render though.

    #2400

    peterigz
    Participant

    I have nice crispy particles again, I found the reason but I’m still a bit confused. I have a function to load a sprite with frames of animation:

    So if I call that function with:

    Where flags is set to “TextureFlags.Filter” only, it seemed to just go ahead and assign both flags anyway, which is odd, I’m not sure why as it gets overridden properly inside the mojo lib.

    So I’ve fixed it to just set one filter by default:

    #2401

    Simon Armstrong
    Participant

    I have had issues with monkey2 flag handling on Pi. I wonder if they are related.

    This code gives different output on Mac and Pi (b=1 on Pi).

     

    #2411

    cocon
    Participant

    This might be a case of OpenGL library issue (changing the texture state somewhere).

    (search something like: SDL textures appear blurred)

    https://www.opengl.org/discussion_boards/showthread.php/166337-Blurred-textures-need-it-sharp

    #2412

    Mark Sibly
    Keymaster

    > shape.image = tlShape.LoadFrames(url, frames, width, height, flags)

    You’re missing the ‘padding’ param. Should implicit enum->bool be disallowed?

    If that’s not it, can you post the lib code?

    #2421

    peterigz
    Participant

    You’re missing the ‘padding’ param. Should implicit enum->bool be disallowed?

    Doh! That was the reason, can’t believe I missed that! I should know by now to look for the obvious thing first, thanks 🙂

    #2422

    ImmutableOctet
    Participant

    @Mark Sibly: Yeah, that may be a wise choice.

    Although, I really have to question why enumerators can even be implicitly casted to integers. It can’t be done the other way around, so shouldn’t you have to add an explicit cast here as well? That would kill two birds with one stone.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.