woof icon indicating copy to clipboard operation
woof copied to clipboard

[feature] implement multithreaded renderrer

Open elf-alchemist opened this issue 1 year ago • 12 comments

Certainly a big ask to make, but I'd like to see Woof able to run with even greater performance, allowing for higher resolution, higher framerate, lower frametime, smoother experience on any WAD's maps of basically any size and complexity. I will understand if the devs deem this out of scope for Woof, but I believe it would be of great value to have great performance without sacrificing the vanilla renderer tricks and the tools and behaviors that were built on top of it, for example, any custom Boom TRANMAP tricks are (and correct me if I'm wrong) effectively useless in truecolor and hardware renderers.

https://doomwiki.org/wiki/Multithreaded_renderer

elf-alchemist avatar Nov 29 '24 21:11 elf-alchemist

Yes, we have plans for a multi-threaded renderer, similar to the KEX port or Rum and Raisin Doom.

smoother experience on any WAD's maps of basically any size and complexity.

Multi-threaded renderer improves performance at high resolutions. If WAD is slow at 100% resolution scale (320x200), it won't improve. Just to keep expectations in check.

rfomin avatar Nov 30 '24 02:11 rfomin

Multi-threaded renderer improves performance at high resolutions. If WAD is slow at 100% resolution scale (320x200), it won't improve. Just to keep expectations in check.

Ah, I see, thank you for the FYI.

elf-alchemist avatar Nov 30 '24 02:11 elf-alchemist

I think this should be a high priority (gamer opinion). Currently performance is unsatisfactory compared to dsda-doom's hardware renderer or Eternity Engine's multi-threaded software renderer (CPU AMD R7 5700x). In this scene from Eviternity, there are noticeable performance drops with Woof with Resolution Scale set to Max (is Max the native resolution?):

Image

Kappa971 avatar Jan 21 '25 00:01 Kappa971

I think this should be a high priority (gamer opinion). Currently performance is unsatisfactory compared to dsda-doom's hardware renderer or Eternity Engine's multi-threaded software renderer (CPU AMD R7 5700x). In this scene from Eviternity, there are noticeable performance drops with Woof with Resolution Scale set to Max (is Max the native resolution?):

Funny you should say this, just now, I had recently arrived on MAP25 on my own Eviternity playthrough 😛. When looking in that particular direction, full of the tree Things, my T480 struggles to maintain a consistent >50FPS without lowering the resolution and turning off translucency and smooth pixel scaling.

Also, can you send in some performance numbers on that same area in DSDA's and EE's plain software renderer, as well as their hardware and multilthreaded ones, if possible? For future reference reference's sake, that is.

elf-alchemist avatar Jan 21 '25 02:01 elf-alchemist

In this scene from Eviternity, there are noticeable performance drops with Woof with Resolution Scale set to Max (is Max the native resolution?):

It's not native, but it's the closest. Due to aspect ratio correction, it is not feasible to get perfect 1:1 square pixels (see https://doomwiki.org/wiki/Aspect_ratio). It's not necessary to set the resolution to MAX, try 400% or 300% - you'll get better performance with not so noticeable difference.

my T480 struggles to maintain a consistent >50FPS without lowering the resolution and turning off translucency and smooth pixel scaling.

There is not much translucency in Eviternity, it should not affect the performance. You don't have a dedicated GPU? Smooth pixel scaling is done on the GPU and is usually almost free.

There are plans to implement a multithreaded renderer, but it will probably take a while.

rfomin avatar Jan 21 '25 04:01 rfomin

There is not much translucency in Eviternity, it should not affect the performance. You don't have a dedicated GPU? Smooth pixel scaling is done on the GPU and is usually almost free.

No, my ThinkPad T480 is running on a Intel i5 8350U, with integrated UHD 620 graphics. I'm not quite sure why, but yes, disable both smooth pixel scaling and translucency helped the framerate on Max resolution in that specific scene on Eviternity MAP25.

elf-alchemist avatar Jan 21 '25 12:01 elf-alchemist

Also, can you send in some performance numbers on that same area in DSDA's and EE's plain software renderer, as well as their hardware and multilthreaded ones, if possible? For future reference reference's sake, that is.

DSDA-Doom (OpenGL) in the same scene does 128 fps, before it did fixed 144 fps, I don't know why now it goes slower (probably depends on some Windows update or AMD video drivers that have improved the performance 😒).

Eternity Engine 165 fps with 8 thread (I don't know why it crashes if I try to change the number of threads from the game menu instead of the config file).

Kappa971 avatar Jan 21 '25 12:01 Kappa971

I'm not quite sure why, but yes, disable both smooth pixel scaling and translucency helped the framerate on Max resolution in that specific scene on Eviternity MAP25.

Forgive me, I was mistaken and remembered incorrectly, translucency, did not affect my performance. And smooth scaling only affected me in non-Max resolution settings, i.e. 300%, 400%, etc.

DSDA-Doom (OpenGL) in the same scene does 128 fps, before it did fixed 144 fps, I don't know why now it goes slower (probably depends on some Windows update or AMD video drivers that have improved the performance 😒).

Eternity Engine 165 fps with 8 thread (I don't know why it crashes if I try to change the number of threads from the game menu instead of the config file).

Thank you! Can you check how they perform on the normal software renderer?

elf-alchemist avatar Jan 21 '25 15:01 elf-alchemist

Thank you! Can you check how they perform on the normal software renderer?

Comparing the same scene from fastest to slowest:

  1. Eternity Engine (Software 8 thread) 165 fps
  2. DSDA-Doom (OpenGL) 128 fps
  3. Woof (Software) 104 fps
  4. DSDA-Doom (software) 84 fps

Kappa971 avatar Jan 21 '25 16:01 Kappa971

If DSDA-Doom could use multi-threaded rendering in OpenGL, performance would improve dramatically by taking advantage of the graphics card's power even more (surely those 128 fps are a symptom of a CPU bottleneck).

Kappa971 avatar Jan 23 '25 12:01 Kappa971

This is kind of a side note, but for whatever it is worth, I find Woof to be the most well optimized Doom source port. I use 100krevs.wad as a baseline performance test, and Woof is the only port where I can play the wad at full speed.

jyetcv avatar Mar 20 '25 13:03 jyetcv

Even Woof runs with very smooth performance on my system, that would be the killer feature to max out a bit more my 5120x1440 Screen resolution and prevent the resolution from dropping in too big steps with dynamic resolution, without the need to cap the max res at 400% max.

Meerschweinmann avatar Mar 29 '25 16:03 Meerschweinmann