Skip to content
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

Shader issues with certain new Android devices #6250

Closed
gm-bug-reporter bot opened this issue Jun 13, 2024 · 2 comments
Closed

Shader issues with certain new Android devices #6250

gm-bug-reporter bot opened this issue Jun 13, 2024 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation are required by this issue project This issue has a sample project attached runner-bug In-game bugs with the "GameMaker Studio 2" runtimes

Comments

@gm-bug-reporter
Copy link

Description

Many shaders simply don't work at all on a few newer-gen Android devices. The attached project works fine on all platforms and most Android phones, but not the Samsung Galaxy S23+, for example. There are a few other phones that our players have reported issues with as well but this is the only device I can personally confirm it is an issue on.

Steps To Reproduce

  1. Run the project on Windows. Observe that the shader correctly re-colors the sprites (left is the original sprite, right is the re-colored/shaded sprite).

  2. Run the project on a Galaxy S23+. Observe that the shader does not work.

Which version of GameMaker are you reporting this issue for?

IDE v2024.600.0.575 Runtime v2024.600.0.601

Which operating system(s) are you seeing the problem on?

Windows 10.0.19045.0

Which platform(s) are you seeing the problem on?

Android

f99862b9-3a67-41f0-b729-388441c7a28e

@gm-bug-reporter gm-bug-reporter bot added project This issue has a sample project attached runner-bug In-game bugs with the "GameMaker Studio 2" runtimes labels Jun 13, 2024
@stuckie stuckie moved this from Triage to Backlog in Team Workload Jun 14, 2024
@jackerley
Copy link

Some Android devices run their shaders in low precision mode in order to have a longer battery life. You can avoid this by adding

precision highp float;

at the top of any pixel shader that requires a higher degree of mathematical precision. In this case adding it at the top of shd_pal_swapper.fsh resolves the issue.

Hope this helps,
Fritz

@jackerley jackerley closed this as not planned Won't fix, can't repro, duplicate, stale Jun 14, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Team Workload Jun 14, 2024
@YYBartT YYBartT added the documentation Improvements or additions to documentation are required by this issue label Jun 18, 2024
@YYBartT YYBartT self-assigned this Jun 18, 2024
YYBartT added a commit to YoYoGames/GameMaker-Manual that referenced this issue Jun 25, 2024
YoYoGames/GameMaker-Bugs#6250

* Added "precision highp float;" statement as a RH variable
* Added an extra paragraph to the Shaders page that mentions you can use this if a higher precision is needed
* Minor changes to the Shaders page, a bit of a visual update
@YYBartT
Copy link

YYBartT commented Jun 25, 2024

Added a paragraph on the Shaders manual page on how to set the highest precision in a shader using the code line given above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation are required by this issue project This issue has a sample project attached runner-bug In-game bugs with the "GameMaker Studio 2" runtimes
Projects
Status: Ready for QA
Development

No branches or pull requests

2 participants