It may not look like much but this is a more or less exact replica of software Quake MDL lighting (with texturing switched off so that you can see the shading). It's done per-pixel in a shader, and of course it gets texture filtering and gouraud shading, but otherwise it's spot on; everything looks the same from all angles. There's just some CPU-side light level clamping left to be done (not that much of a big deal) and we're there.
That's another major bone of contention of mine resolved: how inferior GLQuake MDL lighting was to software Quake's.
Vertex submission has gone up to 16 bytes as we now need to submit two (compressed) normals per vertex as well as 2 (compressed) positions; two of each are needed for interpolation (last verts or currverts). I could compress this down further (back to 12 bytes) but it's probably getting into micro-optimization territory. I'll most likely end up giving it a try anyway, just for the laugh.
On the other hand the requirement to refresh vertexes when the entity angle changes has been removed, so those 16 bytes only need to be refreshed about 10 times per second (rather than 72 times). Interpolation, lighting and shading, etc are all done in shaders, and are all per-pixel and per-millisecond correct.
This is quite a major performance gain with MDLs, which have always been quite a bottleneck in Quake.
Monday, February 14, 2011
DirectQ Update - 14th February 2011 - Fun with MDLs (Part 3)
Posted by
mhquake
at
11:24 PM
Subscribe to:
Post Comments (Atom)
7 comments:
I guess back in the day bilinear filtering and translucent water was enough of a wow-factor to overshadow a lot of things... I certainly never realized GLQuake had so many visual differences with the software renderer.
Maybe completely clueless question but what in this scene brings the frame rate down compared to the Marcher Fortress shot?
Cheers, kempie
Sorry - more important than the question. That is looking superb and cannot wait to play with this.
Cheers, kempie
Looks great, congrats on reaching this milestone! :D
that's some seriously awesome stuff. It's also always interesting to read the technobabble and try to understand it, I learn a lot that way :)
> Maybe completely clueless question but what in this scene brings the frame rate down compared to the Marcher Fortress shot?
host_maxfps 72 ;)
Ahh - obviously I'm hitting new highs in clueless!! Thanks for taking the time to answer.
Looking great mate
CFheers, kempie
Post a Comment