Adaptive Rendering

Published December 06, 2020
Advertisement

My engine posts the calculated FPS over the last second on the window title, and also has an adaptive renderer that calculates how long each frame takes and adjusts the next one accordingly. I noticed that even though my render time was almost exactly 1 / 30th of a second, the frame rate was in the 20s. I realized that I was only actually calculating the amount of time spent in the software renderer, I omitted both any calculations that the fixed stepper was doing and anything the GPU had to do. Whoops, so I altered it to not time the render, but see how long it's been since the last frame right after the glFlush.

I also had a dumb moment chasing a ghost. I was trying to figure out why my frame rate was so low, I hadn't really changed anything and it'd always been consistent until this point. I optimized the hell out of it and got it up higher, but still not where it was. Then I realized my laptop's battery was low so it was running in power-saving mode. That stunted everything, but on the plus side, I did some nice optimizations that do make it faster.

Previous Entry Volumetrics mostly coded
Next Entry E1M1
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement