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

gl_FragData problem and shader not working when having loop functions on GX #2238

Closed
gm-bug-reporter bot opened this issue Nov 18, 2023 · 3 comments
Closed
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
Milestone

Comments

@gm-bug-reporter
Copy link

Description

When having any loop functions inside a shader (for, repeat, while, etc) the shader
is simply not applied at all when building to GX. It works just finy on Windows.

Also, gl_FragData[0] is not working on GX either.

Steps To Reproduce

Just comment the "while" loop inside the shader, or uncomment it and see the
shader not getting applied at all to the drawing. Same thing when trying
to use the gl_FragData[0]. Video reproducing the bug attached.

b8824deb-00f7-4da8-a14b-63dd7e909198

@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 Nov 18, 2023
@jackerley
Copy link

I think this may be a problem with how shader compiler errors are handled

@pkraif
Copy link

pkraif commented Nov 26, 2024

while loops are not guaranteed to be working in WebGL - I recommend using only for. Tested gl_FragData[0] in Beta IDE v2024.1100.0.686 Beta Runtime v2024.1100.0.707 and it's working fine in GX. Closing.

Image

@pkraif pkraif closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2024
@gurpreetsinghmatharoo gurpreetsinghmatharoo added the documentation Improvements or additions to documentation are required by this issue label Nov 27, 2024
YYBartT added a commit to YoYoGames/GameMaker-Manual that referenced this issue Dec 3, 2024
… loop functions on GX

YoYoGames/GameMaker-Bugs#2238

Shaders page: Added a paragraph explaining that shaders may not compile due to a variety of reasons
@YYBartT YYBartT added this to the 2024.13 milestone Dec 16, 2024
YYBartT added a commit to YoYoGames/GameMaker-Manual that referenced this issue Dec 16, 2024
YYBartT added a commit to YoYoGames/GameMaker-Manual that referenced this issue Dec 16, 2024
@YYBartT YYBartT self-assigned this Dec 16, 2024
YYBartT added a commit to YoYoGames/GameMaker-Manual that referenced this issue Dec 17, 2024
… loop functions on GX

YoYoGames/GameMaker-Bugs#2238

* Clarified the note on the Shader Editor page, explaining that HTML5 and GX.games follow the WebGL standard, which is more strict
* Added "WebGL Limitations" under "Creating a Shader" -> "GLSL ES 1.0 Specification" to make it clear that WebGL is GLSL ES 1.0 with some restrictions
@YYBartT
Copy link

YYBartT commented Dec 17, 2024

Clarified on The Shader Editor page that HTML5 and GX.games use WebGL, linking to the section in the WebGL spec that lists the limitations.

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

4 participants