Skip to content

[ZH] Fix the bugged Heat Haze (Smudge) effect of the USA Microwave Tank #1073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xezon
Copy link

@xezon xezon commented Jun 15, 2025

This change fixes the bugged Heat Haze (aka Smudge) effect of the USA Microwave Tank as far as I can reproduce it on my machine.

I have an AMD RX 590. I am unable to reproduce the black screen portion of the issue, but I can reliably reproduce the missing effect.

After a lot of testing and trying different code changes, I figured that this only happens when there is just a single draw call for the smudges. As soon as there were 2, everything worked perfectly. I agreed with Chat Gippity that perhaps this is some GPU driver issue that does not commit to a single draw call and needs some help to commit to it by issuing another dummy draw call.

In my tests, this avoided the issue.

We can only hope that it also fixes the black screen, unless we find a person that can reliably reproduce the black screen.

Original

generalszh.2025-06-15.18-22-00-54.mp4

This change

generalszh.2025-06-15.18-17-58-89.mp4

@xezon xezon added this to the Major bug fixes milestone Jun 15, 2025
@xezon xezon added Bug Something is not working right, typically is user facing Critical Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour labels Jun 15, 2025
}
flushSmudges:
++smudgesBatchCount;
DX8Wrapper::Set_Vertex_Buffer(vb_access);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved this call outside the above scope, because that was within the lock of the vertex buffer, which did not appear to cause issues but is technically not right.

@@ -467,12 +470,12 @@ void W3DSmudgeManager::render(RenderInfoClass &rinfo)
VertexMaterialClass *vmat=VertexMaterialClass::Get_Preset(VertexMaterialClass::PRELIT_DIFFUSE);
DX8Wrapper::Set_Material(vmat);
REF_PTR_RELEASE(vmat);
DX8Wrapper::Apply_Render_State_Changes();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this call, because DX8Wrapper::Draw_Triangles will call this as well and therefore it is redundant.

@Mauller
Copy link

Mauller commented Jun 18, 2025

Pekaman tried this last night and it appears to mostly work for him.

Before he would get a black screen. I will get more people to test it as i integrated it into a test build.

@Mauller
Copy link

Mauller commented Jun 19, 2025

IT seems rather hit and miss, some people don't blackscreen anymore, some see the full effect or a broken version of it, while others still either blackscreen or crash.

Will try to grab some system specs and what affect they had with and without.

@xezon
Copy link
Author

xezon commented Jun 19, 2025

Can we can get the crash dump?

@Mauller
Copy link

Mauller commented Jun 19, 2025

Can we can get the crash dump?

I will get them to try it again later and grab the dumps off them.

It is likely graphics driver related as the crash is clean with no error message from the game.

@xezon
Copy link
Author

xezon commented Jun 19, 2025

Ah. GPU crash? Ufffff. It would be useful to know if Microwave Tank was broken or ok in original game for those that have issues with this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working right, typically is user facing Critical Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Heat Haze effect causes screen to render black on some hardware configurations
2 participants