Menu

#21 [2.1.0 Test-2] Problem with rendering 128x96 textures

Non-Fatal
closed
None
5
2016-08-20
2016-08-14
No

This bug was found in MAP28 of Doom II. Looks likes, the engine is not rendering correctly 128x96 textures, adding 48 pixels of empty space.

Doom II have only two 128x96 textures: BIGDOOR1 and SP_FACE1.

Screenshot: http://i.imgur.com/6c0gJGh.png
How it looks in game: https://youtu.be/YImQ4vayKkc

Also tested in 1.35 and 2.0.4 - same problem there.

Discussion

  • Corbin

    Corbin - 2016-08-18
    • assigned_to: Chilly Willy
     
  • Chilly Willy

    Chilly Willy - 2016-08-18

    The problem is that the engine uses internal images sized to the closest larger power of two since nearly all GPUs the engine was written for required that. If the image isn't a power of two in either dimension, the empty space is filled with black or transparent, depending on whether or not the image is opaque.

    However, the Doom engine requires that wall textures tile if they don't reach 128 lines. So the answer is to manually tile the image when it's loaded, which I added to r_doomtex.cc. This tiles the image horizontally and vertically as needed. However, it's only for Doom format images from a wad file. If someone has made a wall texture as an external jpg/png/whatever, that won't be handled by this fix. If there are a bunch of external textures that aren't the "proper" size, we can add similar code to the EPI routines after decoding the jpg/png/whatever.

    If someone is aware of such a texture pack, please let me know, otherwise I'll mark this closed.

    EDIT: Used this texture pack to create issue with PNG/JPG. Now fixed for those too. Also ran into an issue with current 3DGE exiting with an error if a DDF specified image was missing. That now gives a warning and returns NULL like it should.

    Closing ticket.

     

    Last edit: Chilly Willy 2016-08-19
  • Chilly Willy

    Chilly Willy - 2016-08-19
    • status: open --> closed
     
  • Corbin

    Corbin - 2016-08-20
    • Group: Engine --> Fixed Bugs
     
  • Corbin

    Corbin - 2016-08-20
    • Group: Non-Fatal --> Fixed Bugs
     
  • Corbin

    Corbin - 2016-08-20
    • Group: Fixed Bugs --> Non-Fatal
     

Log in to post a comment.