So a little background:
I've been working on this game engine for a few years and I recently committed a complete overhaul of some of the game systems, and editor, into the repo. You can check it out at https://github.com/gitbetter/Zenith
I've come across an issue whereby a texture rendered onto a full-screen quad seems to warp down the diagonal. I've posted a gif demostrating the issue below. This seems related to how OpenGl (and most graphics APIs) break polygons down into triangles, but I've tried drawing the quad using GL_TRIANGLE_STRIP
and GL_TRIANGLE_FAN
and I still get the same effect.
At this point the engine is a bit too expansive and modularized to single out any part of the rendering code to post here for inspection, but suffice it to say I am drawing the scene, using several render passes, onto a separate target framebuffer, which gets pulled in by the editor and drawn onto a resized UI quad.
Initially I thought this might be due to some sort of buffer swap issue, but I figured that wouldn't matter (I think) since I am not drawing to the screen but a separate framebuffer instead, and buffer swaps are being done correctly after all draw calls have been issued. When blitting the scene buffer onto the default framebuffer (the current window's framebuffer) it looks fine. This only happens when drawing the scene texture onto a screen quad.
Any help here would be appreciated, if anyone's seen this issue before.