nuQuake - Hardware Accelerated Modern Quake
Sega Dreamcast Development and ResearchWhat I mean is that in the very original, software rendered Quake 1 and 2 engine, the base texture maps and the lightmaps were not blended at runtime every time the polygons were drawn. Rather, if I remember correctly from back in the day, each visible surface (polygon) would get its base texture map and lightmap pre-blended at a given resolution and stored in a "flat" surface cache.
The actual polygon rendering pass would then draw the screen one scanline at a time using an edge table, and using the surface cache as texture to draw each polygon's portion of a scanline in a single pass.
The actual polygon rendering pass would then draw the screen one scanline at a time using an edge table, and using the surface cache as texture to draw each polygon's portion of a scanline in a single pass.
So technically one could do the same, pre-blend textures and lightmaps in software or using render to texture into an atlas for each visible polygon, and then each final polygon would take the atlas' UV coordinates instead of its original UVs. This way the per-frame rendering pass could be completely opaque, while only the polygons that become visible between frames would require them being rendered into the atlas.
Some things I've noticed about GLdc implementation at first glance:
pvr_poly_compile is used to generate PVR headers. It's really slow and should be avoided. Changing one setting causes everything to be re-evaluated, and its large size blows out the instruction cache. I made a replacement library for it (which I actually quietly posted with other code a long time ago). I've posted an up-to-date version is here. The library is designed to allow the compiler to optimize function calls to it really well.
When using the FTRV instruction in mat_trans_single3_nodiv and mat_transform3, the vector register fv12 is used for the calculation. That register is a saved register, which means GCC has to preserve and restore its value for the caller, which wastes probably around 8 cycles per mat_transform3 call. Changing it to using any other vector register should give a small speed increase to this function.
Another thing to consider is using the floating point color vertex formats instead of packed color. The TA will clamp the floats to [0, 1] and convert and pack them for you. There's no wasted memory on the PVR side using floats versus using packed color (although if you buffer the vertex data in RAM before sending it to the TA, the buffer will be twice the size).
So far it hasn't gone well, I seem to be only getting single Tris and not strips, also every tri is wildly different colorful rainbows.
latest performance changes are on gitlab
DOES NOT INCLUDE THE RAINBOW SOUP ABOVE
heres a scrambled binary,
Its way faster now, and should run just about most mods but slowly.
DOES NOT INCLUDE THE RAINBOW SOUP ABOVE
heres a scrambled binary,
Its way faster now, and should run just about most mods but slowly.
Any current video of the performance?
Great job as always!
I wonder how it would two of my favorite Dreamcast mods. The fun codename : corporal and codename envenom. I hope it's easy to use with bootdreams if I ever get to it.
Ugh sorry double post.
Very neat! Great quality lighting! Wow! I'm too caught up with Mars but great stuff.
but....
I added gamma control, so thanks! It was a feature i didnt know we needed until just now.
Also can go darker if you so choose?
![[IMG]](https://web.archive.org/web/2im_/https://i.imgur.com/uL5ogk9.png)
Video too:
I just haven't been able to figure it all out yet and there's some stuff I need missing but that's minor for now
Original thread: https://assemblergames.com/threads/nuquake-hardware-accelerated-modern-quake.70660/
![[IMG]](https://web.archive.org/web/2im_/https://i.imgur.com/LmTMgHK.png)
![[IMG]](https://web.archive.org/web/2im_/https://i.imgur.com/wT1bPZK.png)