-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
[3.x] Decrease shader TIME
rollover to 30 seconds on mobile platforms
#59991
base: 3.x
Are you sure you want to change the base?
[3.x] Decrease shader TIME
rollover to 30 seconds on mobile platforms
#59991
Conversation
TIME
rollover to 30 seconds on mobile platformsTIME
rollover to 30 seconds on mobile platforms (3.x)
6078e04
to
5f4d74f
Compare
I don't think we should merge this in 3.x. It will be a visually breaking change and will be confusing and non-intuitive for users. |
On the other hand, a lot of shaders that use Here's an example of such an issue: #43505 While I agree that preserving compatibility between minor releases is important, I'm not sure if it's a goal worth pursuing when the existing behavior is basically unusable out of the box. This is of course something that should be prominent in the release notes. Edit: An alternative is to use the same approach as godotengine/godot-proposals#4834. This would avoid breaking compatibility with existing projects (although they'd be left with the rendering bugs on mobile). |
I noticed that Unity also has similar problems with time. If I remember right they try to solve it by storing some different divisors of time in uniforms (in a vec4), as well as some common sin values of time (in another vec4). Imo though the only foolproof way to solve this mobile, say for water shaders, is for the client code to calculate a repeatable range (e.g a specific sin frequency) then e.g. send it as e.g. 0.0 to 1.0 in a custom uniform. Or multiple of these if there are multiple versions needed in a shader. Sending time in a uniform and then doing these calculations in the shader seems like it will always introduce some kind of error on low precision hardware. Basically for low end mobile, TIME is probably best avoided I suspect. |
This avoids precision issues that became obvious when exporting a project to a mobile platform. Shader animations will have to loop over 30 seconds to avoid visual discrepancies when `TIME` is reset back to 0.
5f4d74f
to
8e6cf3c
Compare
Thinking about this, I think the setting should be added and merged, but maybe its default should match the current default for desktop. That way we do not break existing games, but we do allow people to change the default on mobile who are experiencing issues on mobile. |
This can already be done manually by the user. If you don't want to break existing projects, godotengine/godot-proposals#4834 is an approach that will allow fixing the issue in new projects at least. |
TIME
rollover to 30 seconds on mobile platforms (3.x)TIME
rollover to 30 seconds on mobile platforms
3.x
version of #59990.This avoids precision issues that became obvious when exporting a project to a mobile platform.
Shader animations will have to loop over 30 seconds to avoid visual discrepancies when
TIME
is reset back to 0.