OpenRA / ra2

A Red Alert 2 mod for the OpenRA game engine
GNU General Public License v3.0
977 stars 161 forks source link

Terrain bleeding through the large building sprites #710

Closed Mailaender closed 3 years ago

Mailaender commented 4 years ago

Imgur

pchote commented 4 years ago
Screenshot 2020-05-02 at 12 48 32

Something (possibly an engine-level bug) is causing the soviet conyard to use the giant squid sprite sheet as its depth data.

pchote commented 4 years ago

The depth sprite handling was rewritten between release-20200202 and the current playtest series / bleed, so it is possible that this has already been fixed.

Mailaender commented 4 years ago

It still happens on https://github.com/OpenRA/ra2/pull/738 but the soviet war factory is now the worse offender. Changing DepthSpriteOffset makes other sprite patterns appear. Picking a one that mimics the sprite offset fixes/hides the problem.

pchote commented 3 years ago

I put together a testcase based on #778, https://github.com/OpenRA/OpenRA/pull/19561, and the fix https://github.com/OpenRA/OpenRA/pull/19563.

Check out https://github.com/OpenRA/ra2/commit/582911b48b04db20359c34c8655e29f9bbd42999 and start a skirmish as Cuba on the top-right spawn of "The Alamo" map (or don't, but this should guarantee that you trigger the bug). Disable the shroud and make sure you are zoomed relatively close (zooming too far out changes the order that sheets are mapped and may hide the bug) before enabling the depth preview and tweaking the contrast/offset until you are satisfied that you see the problem:

Screenshot 2021-07-25 at 11 46 49

Its not as obvious as seeing a giant squid embedded in the depth map, but is still clearly not right.

Now repeat with https://github.com/OpenRA/ra2/commit/8bc94038d58c227deccab0fdea2eb7755f7f2f26, which adds https://github.com/OpenRA/OpenRA/pull/19563 and observe that the conyard now displays correctly:

Screenshot 2021-07-25 at 11 57 28

The terrain is still wrong, but that's an unrelated RA2 yaml problem.

abcdefg30 commented 3 years ago

This will be fixed once we update the engine without any changes in this repository.