Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Why do OpenGL renderers show more glitches?

Recommended Posts

Why do OpenGL renderers tend to have more glitches?


One example is shown here:




Another example: this HOM in Alien Vendetta isn't a HOM in the software renderer:



Is it because the software renderer uses integer math, while GPUs use floating point math?

Share this post

Link to post
1 hour ago, dugan said:

Is it because the software renderer uses integer math, while GPUs use floating point math?

Precision is irrelevant, and you are looking at the problem wrong (also Eternity's Cardboard renderer is Doom's software rendering remade as floating point so it kind of just poops on your theory before it begins).


The issue is Doom's map structures aren't made for polygon rendering at all. They are highly optimized structures for its own unique rendering algorithms, such as flooding flats from segs (created when 1 sided textures are drawn first) to form the floors without needing to do any special clipping; the segs already give it that info from the start. Where linedefs meet and where/how textures are assigned are important to a lot of these techniques.


Take that video for example; there's no lower textures around those lines, so no segs are immediately constructed where textures would otherwise be, thus in the software renderer the flat filling just keeps going down the screen creating the illusion that the floor in that area is higher than it actually is. However a polygon renderer is just that and it has no reason to keep drawing, that's not how a polygon works, and thus a hole exists.


This video should be informative to what's actually going on in software rendering, for the most part (the stuff with 3D floors doesn't directly apply, but the concepts remain the same):


Doom's art assets were actually designed around this as well. The sprites for all actors actually extend around 8 units into the floor, using the rendering perspective and lack of floor clipping (as masks are drawn after flats) to give the bottom of the sprite an immediate illusion of depth. Take the feet of most enemies, which look like they are actually standing on the floor rather than tiptoeing on it. However in a polygon renderer, because of the depth buffer, this effect simply doesn't work (without paying attention to it) because the feet will naturally clip into the floor from said offset, or be forced to cancel the offset and breaking the effect somewhat.


It's also where the weird software rendered freelook comes from. Because the rendering is more of a perspective drawing than an actual 3D scene, looking down or up is inherently flawed and relies on Y Shearing as the perspective can't be tilted like a polygon can.

Edited by Edward850

Share this post

Link to post

The reason for the glitches are not the actual rendering structures, but maps which abuse how they work, like missing texture areas getting filled by the adjoining flat and more importanrtly, how the renderer deals with unclosed sectors. Some of these effects are very hard to get right in a hardware renderer which needs to polygonize each sector's surface - which in such cases is often not possible.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now