Ticket #623 (closed task: fixed)

Opened 3 years ago

Last modified 2 years ago

Shadows should be disabled by default on slower cards/drivers

Reported by: fabio Owned by:
Priority: Nice to Have Milestone: Alpha 5
Component: Core engine Keywords:
Cc:

Description

Shadows on some cards/drivers are really slow and should be disabled by default there (eventually the shadows setting on these cards should also be "greyed out" in the GUI and could be only changed in the config file).

On my Radeon X1600:

  • with the mesa r300 gallium driver shadows are pretty fast;
  • with the mesa r300 classic driver enabling shadows make the game run at 1 frame every 20s, while it work at a playable fps without them.

I am attaching glxinfo obtained while using both drivers.

Attachments

glxinfo-r300-gallium.txt (23.5 KB) - added by fabio 3 years ago.
glxinfo of gallium r300 - shadows are usable
glxinfo-r300-classic.txt (22.9 KB) - added by fabio 3 years ago.
glxinfo of classic r300 - with shadows game run at 1 frame every 20s
intel-945.txt (11.1 KB) - added by fabio 3 years ago.
glxinfo intel 945

Change History

Changed 3 years ago by fabio

glxinfo of gallium r300 - shadows are usable

Changed 3 years ago by fabio

glxinfo of classic r300 - with shadows game run at 1 frame every 20s

comment:1 Changed 3 years ago by Philip

Would be good to do something like this.

How can we detect when it's needed? I guess the options are a database of hardware/driver combinations and their capabilities and known bugs, so we can choose what graphics features to enable; or some kind of dynamic detection via a benchmark on first run in order to set sensible defaults, and then let the user tweak it.

comment:2 Changed 3 years ago by fabio

I also tried 0ad on an intel 945 under Ubuntu 10.10 (glxinfo attached) and shadows are really slow also with it. The only thing that came to my mind is that the fast card/driver (r300 gallium) is OpenGL 2.1, the slow cards/drivers are OpenGL 1.4 (intel) and 1.5 (r300 classic). Maybe enable it by default only if OpenGL >= 2.0 (with a three choice option in the config file with default/true/false)?

Also about the renderpath: vertexshader are not supported on r300 classic (I get the fixed one even when forced) and are supported on intel and r300 gallium; however vertexshader is slower (with msec/frames almost double) on intel while it's about the same speed on r300 gallium.

Lastly, on intel fancywater is always disabled (due to #270), but it's changeable in the GUI (however it does nothing): maybe fancyshaders GUI option should also be greyed and made unchangeable.

Changed 3 years ago by fabio

glxinfo intel 945

comment:3 Changed 3 years ago by k776

  • Priority changed from major to minor

comment:4 Changed 3 years ago by k776

  • Type changed from defect to task

comment:5 Changed 3 years ago by fabio

  • priority changed from major to minor.

Hi, I would assign a higher priority to this, or else users that just try the game will be disappointed that it doesn't run properly on their card and complain on the forum or just disinstall the game. There is also an easy workaround, disabling shadows when OpenGL < 2.0.

comment:6 Changed 3 years ago by fabio

There are many examples on the forum, e.g.: http://www.wildfiregames.com/forum/index.php?showtopic=13731

comment:7 Changed 3 years ago by k776

Compared to some of the other things (like broken functionality, or patches which need reviewing and applying), I don't consider this 'major'. Users can edit the config and turn shadows off themselves. I agree disabling this automatically, along with fancy water, so it at least runs is a good idea, but right now, as far as development goes, it's not stopping anything.

And I didn't push it back to Alpha 4 yet, like I did with quite a few other tickets, as it would be good to have in Alpha 3 if there is time. You might check with Philip or Brian to see how easy this would be. IF they can nut it out in an hour or so, great.

comment:8 Changed 2 years ago by k776

  • Milestone changed from Alpha 3 to Alpha 4

comment:9 Changed 2 years ago by k776

  • Priority changed from Nice to Have to If Time Permits

comment:10 Changed 2 years ago by philip

(In [8983]) Disable shadows and fancy-water by default on some slower graphics devices. See #623.

comment:11 Changed 2 years ago by Philip

  • Milestone changed from Alpha 4 to Alpha 5

Since we've got the hwdetect thing now, I've set it to disable shadows on the devices reported here (and on my own Intel one) (and also disable fancywater on some devices).

This isn't comprehensively solving the problem for all cases where shadows are slow - need some more data for that (hopefully the new reporting feature will provide useful data) so I'm leaving this ticket open for now, and it should be addressed more thoroughly later.

comment:12 Changed 2 years ago by fabio

I'd suppose this can be closed now.

comment:13 Changed 2 years ago by k776

  • Priority changed from If Time Permits to Nice to Have

comment:14 Changed 2 years ago by philip

  • Status changed from new to closed
  • Resolution set to fixed

(In [9305]) Disable shadows/fancywater by default on more Intel devices. Fixes #623 for now. Add script to help verify correctness of hwdetect.

Note: See TracTickets for help on using tickets.