Fixed Lower textures with Lower Unpegged flag are rendered incorrectly in OpenGL

Status
Not open for further replies.
Here's a screenshot of a lower texture that has the Lower Unpegged flag, taken in Software:

attachment.php


Notice how the texture is attached to the lower of the two floors, like it should be. Now here's the same scene, taken in OpenGL:

attachment.php


Clearly this is wrong. It turns out that instead of pegging the texture to the lower floor, in OpenGL the texture is pegged to the ceiling above that floor. Here's a test map:

https://dl.dropboxusercontent.com/u/27962790/lowerunpegged.wad

Zone Builder's Visual Mode has the same issue, so you can easily observe it there: Move the floor that the texture should be attached to and you'll notice that the texture doesn't move along with it. Now move the ceiling above it and suddenly the texture does move, even though it shouldn't.

Here's a link to the relevant rendering code, for easy reference: http://git.magicalgirl.moe/STJr/SRB2/blob/master/src/hardware/hw_main.c#L1704
 

Attachments

  • srb20001.png
    srb20001.png
    24.8 KB · Views: 698
  • srb20002.png
    srb20002.png
    40.9 KB · Views: 699
Last edited by a moderator:
Fixed this as well as problems with skewing for Lower Unpegged lower textures and normal upper textures that MascaraSnake and I also discovered... at least, they're fixed for SRB2 itself anyway, lol.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 0, Members: 0, Guests: 0)

Back
Top