Performance Issues? You won't BELIEVE how much fps is gained with this ONE TRICK!

As a programmer I'd say it's not the number of lines that are the problem but the quality of the code, a badly coded loop can be worse than simply repeating a block of good code X number of times. Generally less code is better ( from memory overhead and instruction count etc ) - it's a balancing act between making working, readable and manageable code vs super efficient but only the author fully understands it and can maintain it properly.



Code generators and programming by drag-n-drop UI's have always generated inefficient code - I hate them simply because of this - I don't work in gaming but in business application world there is a strong pull for generated code and low-code/no-code solutions - the up side from management point of view is they think they think they can hire any one to drag-n-drop some programs together - the down side is the massive amount of inefficient code that's generated. Only winner if the hardware industry as everyone needs faster processors and more memory to run these Frankenstein programs.

There was a time when I'd reference Elite as a shining example of great code - the original PC Elite game on two floppy disks, but if you didn't like the music you could actually run the whole game from a single floppy ! Those days are gone, now Elite Dangerous is a stinking example of bad coding and bad management.
Had a boss who implemented code generation on one of our web applications. he basically transferred all the overhead of maintaining and writing good code to maintaining and writing his code generation / templating tool. it was absolutely boring, inefficient and stupid, and abstracted us all away from our real jobs.
 
So... If a slight side-track is permissable...

These smoke (...and other) sprites -- they have this irritating behaviour of rolling along with the game camera - exponentially more annoying in VR -- would you say this is down to the manner in which the sprite/particle handling aligns axes, or could it be the shaders ignoring UVs, and using the textures straight-up in buffer space?
 
Being a pig in mud with my new found fps, gave it another go.

Seems like this has deleted the volumetric fog shader? Its definitely missing from the tutorial and the usual places in stations etc.

Yep there's no off setting, just low... the one setting we couldn't have :)

I'll personally be running with it off still.
 
Isn't the code for settlement fires going to be a hell of a lot more complicated than the mailslot smoke? It's not like they've just added more lines of code because they're mentally inferior to the people in this thread. Optimisations will happen, just probably not in the order any particular individual would like them to happen.
 
View attachment 284562
Excuse the clickbait title. I've finally got back to Odyssey after being on hiatus since the alpha, and am disappointed to see that performance hasn't really improved, at least not significantly - especially given that there is still so much low hanging fruit, of which this smoke effect is by far the lowest hanging and biggest performance killer in these offline settlements. To disable this effect I used 3DMigoto (I'm one of the authors of this tool) to skip the draw calls associated with this shader. Normally when people ask me if 3DMigoto can improve performance of a given game I answer "unlikely" (depends where the bottlenecks are, usually skipping an effect or two won't make much difference), but this is one case where the answer is a resounding "yes!".

I don't really intend to release the mod to do this - the point of this post is more to try to gain some attention on the issue. It would be dead simple for Frontier to add an option to the settings to disable this shader, and should be near the top priority of their optimisation efforts. And if they do go and tweak the shader, than any mod I release would break as the shader hash would change.
Intersting, and I have a question, as I'm not a coder: do you think the other various "blur" FX have the same effect on performance? There are quite a few in the settings.
 
I tried an A-B test of this and only saw 'at most' 2-3 fps difference in perf; at least within error bars. This is on a 3080.
If you're doing an A-B test use something like this to add a toggle button (this is what I used to take the two screenshots and compare before/after performance without moving the camera or otherwise changing state in a way that might have affected it):
Code:
[Constants]
global $show_smoke = 0

[KeySmoke]
key = z
$show_smoke = 1, 0
type = cycle

[ShaderOverrideBadPerformanceSmoke]
hash = cb9b58ca58c6c572
if !$show_smoke
   handling = skip
endif

These smoke (...and other) sprites -- they have this irritating behaviour of rolling along with the game camera - exponentially more annoying in VR -- would you say this is down to the manner in which the sprite/particle handling aligns axes, or could it be the shaders ignoring UVs, and using the textures straight-up in buffer space?
Yeah, I've noticed that. They've used a pretty typical billboard style effect without consideration that pinning "up" in a fixed direction relative to the screen isn't appropriate for a game like ED.

Seems like this has deleted the volumetric fog shader? Its definitely missing from the tutorial and the usual places in stations etc.
I might be able to find a way to filter out the smoke and leave the volumetric fog intact - 3DMigoto has multiple strategies that can be used to try to narrow down specific uses of identical shaders (e.g. matching the texture it is used with), however as I mentioned my intention isn't really to release a polished mod but rather bring attention to the issue.

Isn't the code for settlement fires going to be a hell of a lot more complicated than the mailslot smoke? It's not like they've just added more lines of code because they're mentally inferior to the people in this thread. Optimisations will happen, just probably not in the order any particular individual would like them to happen.
In Odyssey they are the same shader - same code running on the GPU (not necessarily the same on the CPU - 3DMigoto only sees the GPU side). The shader has multiple if blocks, so it is likely that they enable/disable different parts of the shader depending on the situation where it is used (flow control is not very efficient on the GPU - most games trade off increased VRAM usage by having multiple (potentially hundreds) of faster shaders with one code path for each situation instead of one slow shader with many possible paths as this one has).
 
I might be able to find a way to filter out the smoke and leave the volumetric fog intact - 3DMigoto has multiple strategies that can be used to try to narrow down specific uses of identical shaders (e.g. matching the texture it is used with), however as I mentioned my intention isn't really to release a polished mod but rather bring attention to the issue.

If you would enjoy the challenge, please release a mod. If such an expense is still present since last may, and they haven’t tried using the horizons version even, it can’t hurt to try something out of the community. Most a year is enough time to allow a more natural solution?

Maybe they’re just going through all the code sequentially without priority so who knows how long it’s going to take.
 
Last edited:
If you're doing an A-B test use something like this to add a toggle button (this is what I used to take the two screenshots and compare before/after performance without moving the camera or otherwise changing state in a way that might have affected it):
Code:
[Constants]
global $show_smoke = 0

[KeySmoke]
key = z
$show_smoke = 1, 0
type = cycle

[ShaderOverrideBadPerformanceSmoke]
hash = cb9b58ca58c6c572
if !$show_smoke
   handling = skip
endif

Ps. Just in case you don't want to do a mod, this is mod enough. A button press to leave it on in space / off in settlements works fine!
 
Someone on Reddit asked if the issue also affected Horizons - it doesn't, but the question prompted me to find the equivelent shader used in Horizons to make some comparisons - this shader is used in the mail slot (the plumes of blue smoke), so I loaded up Horizons and located the pixel shader that it uses for that effect, which has:

33 instructions (2% the size of the Odyssey shader!)
0 loops (yay!)
2 uses of flow control (if/else blocks, and they skip a divide so they probably improve performance)
2 texture samples (quite reasonable)
0 buffer loads of any type (yay!)
Is only called 4 times/frame while looking at the mail slot (makes sense - I see four distinct smoke plumes)

Conclusion: Horizons uses a much leaner and way more efficient shader for the same effect, and calls it a reasonable number of times.
Bears repeating.
 
Bears repeating.
Got ya covered, buddy.

p4hy8vVyKt1t1eay5_640.jpg
 
There was a time when I'd reference Elite as a shining example of great code - the original PC Elite game on two floppy disks, but if you didn't like the music you could actually run the whole game from a single floppy ! Those days are gone, now Elite Dangerous is a stinking example of bad coding and bad management.
Actually, there still seem to be thriving communities behind the minimalist demo scenes and coding challenges. I've got a colleague who partakes in one of the European chapters and regularly codes 4 Kb C64 demos for competitions.

Extremely impressive and popular example from over a decade ago:

 
Someone on Reddit asked if the issue also affected Horizons - it doesn't, but the question prompted me to find the equivelent shader used in Horizons to make some comparisons - this shader is used in the mail slot (the plumes of blue smoke), so I loaded up Horizons and located the pixel shader that it uses for that effect, which has:

33 instructions (2% the size of the Odyssey shader!)
0 loops (yay!)
2 uses of flow control (if/else blocks, and they skip a divide so they probably improve performance)
2 texture samples (quite reasonable)
0 buffer loads of any type (yay!)
Is only called 4 times/frame while looking at the mail slot (makes sense - I see four distinct smoke plumes)

Conclusion: Horizons uses a much leaner and way more efficient shader for the same effect, and calls it a reasonable number of times.
So much for their new and "improved renderer".
1640896455035.jpg
 
Interesting yet also frustrating.

Why is the company who created this on their very own engine struggling to address these issues when a hobbyist player can work it out in a much shorter timeframe than over half a year?

Too many other issues so this one gets drowned in a sea of bugs? Looking at the seemingly significant performance gains wouldn't this have been quite high up the priority list?

I just don't get it.

I'm feel'n you CMDR. Here's the issue though. The OP is a workaround, not a fix. If FD implemented this workaround they would have to undo it once a fix materialized. There's no telling what catastrophe would result from such an endeavor. ...and there would be one.
 
Top Bottom