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 compilation fails when running game but works in editor #79324

Open
JonqsGames opened this issue Jul 11, 2023 · 5 comments
Open

Shader compilation fails when running game but works in editor #79324

JonqsGames opened this issue Jul 11, 2023 · 5 comments

Comments

@JonqsGames
Copy link
Contributor

Godot version

4.2

System information

Windows 10

Issue description

I have a shader with #include statement. The shader works fine in editor but when running the game i get an error:
image
The included file is also used by other shader and works fine in both editor and in game.

Steps to reproduce

Still trying to isolate the issue

Minimal reproduction project

Still trying to isolate the issue

@JonqsGames JonqsGames changed the title Shader compilation fail but works in editor Shader compilation fails when running game but works in editor Jul 11, 2023
@akien-mga akien-mga added this to the 4.2 milestone Jul 11, 2023
@JonqsGames
Copy link
Contributor Author

JonqsGames commented Jul 11, 2023

I managed to isolate the issue, this only happen when using a shader saved as .tres, i saved my shader back to a .gdshader as all my other shader and it fixed the issue.

@bitsawer
Copy link
Member

Try to post a minimal MRP test project if/when you can. I have a few hypothetical theories in my head about what might be happening, but without a test project I can't really do much.

@jitspoe
Copy link
Contributor

jitspoe commented Sep 8, 2023

I also ran into this issue and thought it would be easy to reproduce, as it seemed it was simply a matter of having a shader in a .tres file include something, but I tried creating a simple repro project and could not reproduce the issue. I even copy/pasted the shaders from my other project and couldn't reproduce it. I'm not sure what's different. This is the second time today I haven't been able to create a minimal repro project for some bug I've found. 😠

I thought maybe it was because it was a loaded scene, and the loading function was where the "Tokenizer: Unknown character #35: '#'" error occurred, but even trying to load a separate scene didn't cause the issue to occur, so I'm out of ideas for the moment.

@YuriSizov YuriSizov modified the milestones: 4.2, 4.3 Nov 15, 2023
@YuriSizov
Copy link
Contributor

This is the second time today I haven't been able to create a minimal repro project for some bug I've found. 😠

You can get in touch with relevant maintainers directly if you are willing to share a complete project privately for the purposes of debugging. It is the only way sometimes, though it makes things harder. But harder is better than impossible!

@JonqsGames
Copy link
Contributor Author

I forgot to notify but I think the whole issue is only reproduce when saving shader as .tres and not .gdshaderThis happened after I saved a shader from StandardMaterial3D

@clayjohn clayjohn modified the milestones: 4.3, 4.x Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants