Daemon icon indicating copy to clipboard operation
Daemon copied to clipboard

Broken GL_RGBA16 image format on ATI R300

Open illwieckz opened this issue 6 months ago • 1 comments

With r_highPrecisionRendering off:

unvanquished_2024-08-09_003040_000

With r_highPrecisionRendering on (default):

unvanquished_2024-08-09_003028_000

unvanquished_2024-08-08_231920_000

unvanquished_2024-08-08_231940_000

unvanquished_2024-08-07_175313_000

This was added in d2b9a688bc7bc7d238281a4ae6630207007772df from #1050 and slightly modified in #1164:

  • https://github.com/DaemonEngine/Daemon/pull/1050
  • https://github.com/DaemonEngine/Daemon/pull/1164

The usage of GL_RGBA16 is meant to reduce color banding when doing full overbright bit computation, and is fully optional. Disabling the r_highPrecisionRendering cvar is only expected to increase color banding and then reduce quality, but doesn't disable any feature.

I find it very hard to know more about GL_RGBA16 support, it looks to be very ancient and probably expected to be ubiquitous. For example someone in that old forum thread is saying that it exists since OpenGL 1.1:

https://gamedev.net/forums/topic/517023-gl_rgba16f_arb-vs-gl_rgba16/

I don't know if there is a way to query the support of GL_RGBA16. And if there would be, maybe the r300 Mesa driver is expected to support it, as I don't get any OpenGL error being reported when I run the game on such hardware and driver.

So maybe it's a bug in the Mesa r300 driver.

On our side we can simply disable r_highPrecisionRendering on low and lowest presets, as those cards would better run with such preset, and we better disable that feature for performance on such hardware anyway.

But we also better want to avoid visual glitches if possible, especially since this feature is enabled on default medium preset, and we may implement a workaround to disable the feature on R300.

illwieckz avatar Aug 09 '24 00:08 illwieckz