Closed nkrapivin closed 4 years ago
This is very interesting, I've created the NoShader objects for the Android port, I'll try your fix later today. I confirm that the shader does not work on Android at the moment.
And another thing: I remember seeing similar malfunctions in the shader after an attempt to convert the project to GMS2 a while ago, even on PC. I'll try both today, if I have time.
TimeTravelShader is very simple, just some math stuff like mod()
, it's really weird that it doesn't work on Android.
Maybe try my fix? Also what's your test phone? Maybe your phone's GPU is quite poor?
Here's a video of TT shader working on my phone (after the fix): https://drive.google.com/file/d/1wHQcCB3ajU5ADuLcZ2D2YYV6S31Pbuy0/view?usp=sharing
Redmi 6A, Android 9, MediaTek Helio A22 It's a pretty low-budget phone yet STT runs. It's not really smooth, when doing surfaces framerate drops a lot. But overall you can complete the first zone :p
I managed to integrate this, and... yes, it works so well!
You are right, the NoShader objects are not needed.
I test with my old phone, a Xiaomi Mi A1, and while the game runs well on it, the shaders simply glitch out, with random outcomes really: in case of the wave during the name crawl, sometimes I get a solid white wave, sometimes I get a solid white wave with rectangular holes, sometimes nothing at all. All the while, the rest of the game works. So I don't know whether it's the GPU that's the issue, or something with the Android runner...?
Anyhow, your code fixed it. So weird to see the effect on my phone after three years ^^.
It's committed and pushed. Thanks a lot for your submission!
I found this while I was working on my PS4 branch. The original code in the Create event looks like this:
But for some reason, PS4 (and maybe some other platforms, need to recheck), do not save uniform values after shader_reset() As such, you need to set uniform values every single time. Like this (still Create):
And then in the Draw event:
Who knows, maybe NoShader objects weren't needed at all...(?)
PS: this fixed the shader issues on PS4, the game is working perfectly.