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
Film grain shader bug when switching to full screen #529
Comments
ce45377 (9.06) - no bug Note that this bug affects latest GitLab CI/CD builds too - i.e. it's unrelated to build environment. |
So, the culprit is most likely one of the three commits : 9590884 1281fb1 c949545 - and those commits indeed deal with a big rendering refactor, which looks like a good candidate for such an issue. As according to the symptoms it may look like the film grain texture stored on GPU becomes corrupt - and therefore considering commit message the first one of the three may be the most viable candidate to blame. With commit 40e39f6 the game crashes with some null pointer exception when launching the app or trying to go full screen - but after pressing "YES" (continue running) the image is correct, no issue. So technically it still may be related but some additional environment reinitialization happens due to a crash. I didn't try other commits between the one above and 74f18e2 - because according to commit messages they are unrelated. However I may be wrong. |
And just a note from Discord, this bug doesn't affect Linux - seems like Windows-only thing. Everything works well on Linux with ab66b5a (29.07) |
Ah, and one more thing to think about: don't trust my video but test for yourself. It may be again the bug of my weird Radeon drivers for Windows (just like the one with unlit one-sided materials). |
Sorry for delay! I can reproduce the problem, on a Windows with NVidia. So this is not specific to your "weird Radeon drivers for Windows" :) My system:
It's my regular laptop where I do most CGE development in 2023, so I would expect everything to work perfectly here :) Yet I can reproduce the issue you show. Looking into it. |
I emphasize that AD 1 ("screen effects doing something weird when switched fullscreen") and AD 2 ("FPS display broken after a few frames") are completely indedepedent. Merely adding that |
This specific shader breaks (behaves unexpectedly: just appears as dark overlay in Vinculike project, displays garbage in this project) when the app goes to full screen by
Window.FullScreen := true
or rather when changingWindow.FullScreen
from the value the app initially started.I couldn't reproduce this effect on a different shader, so most likely it's something in the way this shader is written or how it is handled from the code.
The version of CGE is close to the latest (updated on Weekends if I remember correctly - most likely a day before I've written the post on Discord, I wanted to check if upgrading CGE won't fix the issue). Note, that this bug started appearing relatively recently, I'll try a bisection and see if I could pinpoint it.
Minimal reproduction example:
full-screen-bug.zip
Steps to reproduce:
Video:
https://github.com/castle-engine/castle-engine/assets/10726162/0310b30e-8797-45a7-b8e3-d57334b1cd11
(when everything disappears the app is in fullscreen and the picture is the same as when returning from full screen mode)
The text was updated successfully, but these errors were encountered: