[Solved] Random flickering on the Assets when playing a level

Description: Report bugs and ask questions regarding Moondust and libraries here.
Forum rules: Here you can ask any question related to Moondust Project (former PGE Project) components:


Any questions related to SMBX2 project and LunaLua library please ask HERE (SMBX2 subsection)
Any questions related to SMBX-38A (1.4.x) Chinese project please ask HERE (SMBX-38A subsection)
Any questions related to TheXTech Project please ask HERE (Vanilla SMBX and TheXTech subsection)
Moderators: Moderators, Semi-moderatos

Wonolf
Topic author, Citizen
Citizen
Avatar
Wonolf
Topic author, Citizen
Citizen
Age: 29
Reputation: 2
Posts: 5
Joined: 14 Jul 2025
English Pronouns: He/Him

Post #1by Wonolf » 14 Jul 2025, 21:44

Hello,

I've downloaded TheXTech to give it a try, so I created a test level using the Moondust editor with TheXTech config package.
I've included custom graphics in the level, but when I test it, in both the Moondust, and TheXTech game itself, all graphics in a level show a flickering when moving.

Spoiler
Image

Does anyone know what could be the reason?
Thanks in advance!

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 33
Reputation: 506
Posts: 1919
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #2by Wohlstand » 15 Jul 2025, 10:18

Hello! I guess you are lucky owner of Intel Iris Xe and running it on Windows 10 (EDIT: I see in your profile Windows 11), right?
Here is a similar problem documented, the texture corruption glitch is the same https://github.com/TheXTech/TheXTech/issues/859 (this problem is mentioned in the list of known issues at release announcement as well).

You can escape this problem by opening advanced settings and selecting the "SDL2 HW" render mode. It should just work, but masked render might be inaccurate with this cost.

Also, did I guessed your hardware spec right? If no, then please tell me your GPU name, and I will append it to the issue mentioned above.

Added after 8 hours 20 minutes:
Can you tell me what exact GPU name you do have? It's easy to obtain:
- Hit "Win+R"
- Then type "dxdiag" in pop-up window, and press OK.
- If pop-up question about WHQL will appear, answer anything.
- Then, at opened DirectX diagnostic tool, switch the Video tab, and you will see exact name and spec of your video card.

If that's really Intel Iris Xe, then bravo, you might have an invalid driver. I trying to seek around for details why that might happen. And I have some ideas to try.
Image

Wonolf
Topic author, Citizen
Citizen
Avatar
Wonolf
Topic author, Citizen
Citizen
Age: 29
Reputation: 2
Posts: 5
Joined: 14 Jul 2025
English Pronouns: He/Him

Post #3by Wonolf » 15 Jul 2025, 19:50

Hello,

Thanks for your answer!
You got it right, I'm a lucky owner of an Intel Iris Xe indeed.
I'm also running on a Win11 too.

Changing the render mode to SDL2 worked as a charm, should be good enough for me and my silly project.
Thanks again!

Spoiler
Captura de pantalla 2025-07-14 203919.png

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 33
Reputation: 506
Posts: 1919
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #4by Wohlstand » 15 Jul 2025, 20:17

That's super! Now, I have some to ask you to try, I am really curious, will that fix the thing or it will still fail. I want to figure the stuff to make full sure what the best solution will be.

So, according various articles (in Russian), Intel Iris Xe promises power, but de-facto it's a glitchy and faulty thing:

So, I want to ask you:

Also, just a note that Generic driver might be overriden by one another update of Windows by faulty Generic one and it's need a tweak to apply to avoid that (first Russian article describes that).

Added after 4 minutes 53 seconds:
And also, if OpenGL will still fail with Generic driver on Intel Iris Xe, then I will need to add the workaround to fall back to the SDL Render to avoid such problem in the future.

Added after 44 minutes 20 seconds:
By the way, coiuld you also upload one of your log files just in a case? (You can find them at "logs" directory in your game root or user directory). Me and my co-developer need an intro that tells about OpenGL initialisation stuff (you might want to just copy that part and paste here, there are a chain of Info events that reports what OpenGL specs are been detected). That could help us to implement the workaround for the future.
Image

Wonolf
Topic author, Citizen
Citizen
Avatar
Wonolf
Topic author, Citizen
Citizen
Age: 29
Reputation: 2
Posts: 5
Joined: 14 Jul 2025
English Pronouns: He/Him

Post #5by Wonolf » 15 Jul 2025, 23:49

Hi!

Let's see, I did the following:

>> Downloaded and installed the generic Intel Iris Xe driver from the page you shared.
>> Restarted the computer.
>> Open the game and changed the render option to OpenGL 3+

RESULT: The game run mostly fine, but during a level run, the flicker appeared for a couple of frames twice in the level. At least it's not consistent like at first.

See in the Spoiler the attached log file from the run:
Spoiler
TheXTech_log_2025_07_15_22_41_51.txt
(2.09 KiB) Downloaded 22 times

Let me know if you need anything else for the troubleshooting, I'll gladly help!
Thanks!

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 33
Reputation: 506
Posts: 1919
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #6by Wohlstand » 16 Jul 2025, 0:20

Thank you very much!

So, I definitely should implement the workaround for this. You just confirmed that Intel Iris Xe serie is again generally faulty, and it's need to use it carefully to avoid serious glitches like this one.

Added after 3 hours 27 minutes:
Okay, I made the workaround: https://github.com/TheXTech/TheXTech/commit/1a249dec6fcec67d38ebb8d7fc68138eadf4ea72
And so, once CI finish the build, you can obtain the devel build here https://builds.wohlsoft.ru/win32/thextech-bin-win64-stable-1.3.7.x.7z (executable only, just put over yours)

Added after 4 minutes 57 seconds:
And so, to ensure the thing works, try to toggle OpenGL and "Auto" render modes to see the difference. And also, it should explicitly tell in the log file that "faulty Intel Iris Xe GPU detected..." to mean that workaround works and it bans the direct OpenGL use here to use SDL Render instead.
Image

Wonolf
Topic author, Citizen
Citizen
Avatar
Wonolf
Topic author, Citizen
Citizen
Age: 29
Reputation: 2
Posts: 5
Joined: 14 Jul 2025
English Pronouns: He/Him

Post #7by Wonolf » 16 Jul 2025, 19:58

Hello,

I tried with the 1.3.7.x build, in the logs it does appear that message that you mentioned.
I'll attach here for reference.

Spoiler
TheXTech_log_2025_07_16_18_50_48.txt
(2.39 KiB) Downloaded 43 times

Haven't had any issues in my playthrough, thanks!

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 33
Reputation: 506
Posts: 1919
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #8by Wohlstand » 16 Jul 2025, 20:05

Super!

However, me and co-developer ds-sloth during discussion has some another idea, that might implement the BETTER workaround that would enable all the OpenGL features (such as bitmask render with all render accuracy of SMBX 1.3 support and light/shadow effects) and avoid cases that might result corrupted textures especially when running Iris Xe graphics. I will let you know when another test build will be done and you could try to test it too to confirm, will any glitches appear here or not.

So, for a moment right now, the whole OpenGL render is avoided by falling to SDL Render that doesn't allows bitkask render but just works everywhere including impossible hardware.
Image

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 33
Reputation: 506
Posts: 1919
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #9by Wohlstand » 18 Jul 2025, 1:15

Hello!
Recently a new tweak was done and it had been tested by my buddy on the similar hardware and it seems works now.

So, please re-download the test build and try it again with the OpenGL render and tell me, does it now works properly after all?

https://builds.wohlsoft.ru/win32/thextech-bin-win64-stable-1.3.7.x.7z

I disabled the depth buffer completely https://github.com/TheXTech/TheXTech/commit/90e3f412fbd81d6a7498e5650db98c5251f34f53 since this feature just fails on Intel Iris Xe as we can see.
Image

Wonolf
Topic author, Citizen
Citizen
Avatar
Wonolf
Topic author, Citizen
Citizen
Age: 29
Reputation: 2
Posts: 5
Joined: 14 Jul 2025
English Pronouns: He/Him

Post #10by Wonolf » 18 Jul 2025, 22:17

Hello there!

I downloaded the new version and tried with the OpenGL3 render option, it worked perfectly!
See attached the logs for reference.

Spoiler
TheXTech_log_2025_07_18_21_08_47.txt
(2.43 KiB) Downloaded 16 times

Thank you for the updates!
Let me know if you require any other testing from my side.

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 33
Reputation: 506
Posts: 1919
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #11by Wohlstand » 18 Jul 2025, 22:39

That's super!
So, seems everything is completely solved! The only unknown fact, will it fail on such hardware running on Linux, and that means should I enable the same tweak on Linux too or keep it for Windows exclusively.
Image


Return to “Troubleshooting”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest