Skip to content

gfx_ssao.lua and gfx_orb_effects_gl4.lua shaders appear "cut" in half horizontally on AMD/Linux #6343

@AntlerForce

Description

@AntlerForce

Description

Image

Image

Video: https://imgur.com/a/UeRAn1R

This visual bug was introduced with the big lighting update in this commit: 9f684b3

It didn't appear when I tried the version of the ssao widget from the version before: https://github.com/beyond-all-reason/Beyond-All-Reason/blob/356450e36d65c291c1b1f09e2016a2bcecef6170/luaui/Widgets/gfx_ssao.lua

It only appears on map where water is present. It's not affected by /luarules disablecusgl4 or /water 0.

It is an exclusive issue to shaders that use DrawWorldPreParticles https://github.com/search?q=repo%3Abeyond-all-reason%2FBeyond-All-Reason%20drawworldpreparticles&type=code

Both widgets have the line if drawAboveWater and not drawReflection and not drawRefraction then under DrawWorldPreParticles. I can reverse the effect, cull the top half of the screen instead of the bottom half, by replacing drawAboveWater with drawBelowWater in both widgets. Or, if I remove drawAboveWater from the orbs widget it looks normal again but I do the same with SSAO, the bug is gone when the camera is stationary but the line re-appears when the camera is zooming in/out or panning up/down.

Expected Behaviour

No visible cutoff line in this location.

Actual Behaviour

Visible cutoff on AMD/Linux graphics configs.

Reproduction steps

It's easy to see this bug in the trees on the map aethermoor_creek_1.0 or angel_crossing_1.5.1, or by looking at the orbs above a Juno, Keeper, Fusion, or Advanced Fusion.

Other

Might affect AMD/Windows too. Doesn't occur on Nvidia/Linux.
Might be an engine bug with DrawWorldPreParticles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions