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 for coloring units and terrains does fail on web export #22

Closed
HunterNN opened this issue Jan 26, 2024 · 8 comments
Closed

Shader for coloring units and terrains does fail on web export #22

HunterNN opened this issue Jan 26, 2024 · 8 comments
Assignees
Labels
bug Something isn't working engine
Milestone

Comments

@HunterNN
Copy link
Contributor

I have encountered an issue where the shader used for coloring units and terrains is not working as expected when exporting the project to a web format. I tested it in Firefox and Chromium:

image

As you can see, the units and buildings are all in their respective sprite colors.

@HunterNN HunterNN added bug Something isn't working engine labels Jan 26, 2024
@HunterNN HunterNN added this to the v0.7.0 milestone Jan 26, 2024
HunterNN added a commit to HunterNN/Codename-Recon that referenced this issue Jan 27, 2024
@DigitalGhostHub
Copy link

Deleted previous export templates and redownloaded with Official Github instead of Best Available - and exported in Compatibility - now the shaders are working. Tested in Firefox and Edge and using Itch.Io with BufferArray support. (Won't catch me installing Chrome)

@HunterNN
Copy link
Contributor Author

HunterNN commented Jan 28, 2024

Based on what I can see, it seems that the problem lies in the cache generation process for the .godot folder. Specifically, the shader issue only occurs when this folder is missing, and it gets created using this command

godot --project . --headless --quit-after 200 -e 2>/dev/null

It seems that this step may not be necessary at all, as none of the example repositories use such a line or commit the '.godot' folder. I suspect that the --export-release flag should generate it automatically, but for some reason, it doesn't:

abarichello/godot-ci#127

An export to the web using a normally generated '.godot' folder has no issues with color shading.

@Dracks also FYI

@HunterNN
Copy link
Contributor Author

Deleted previous export templates and redownloaded with Official Github instead of Best Available - and exported in Compatibility - now the shaders are working. Tested in Firefox and Edge and using Itch.Io with BufferArray support. (Won't catch me installing Chrome)

Could you please test the multiplayer feature for me if you have hosted it on Itch.io? To do this, simply click "multiplayer" and then "lobby" from the main menu. When hosting on a local computer, it appears to be unable to connect to Nakama.
image

@DigitalGhostHub
Copy link

Same result on Itch.io, cannot connect to the lobby server

@HunterNN
Copy link
Contributor Author

HunterNN commented Jan 28, 2024

Ok back to topic.

While it's great that we can manually export to the web and have the shader working, we still need an automated solution for this issue #25 . Therefore, I will keep this issue open for now.

I have posted a comment on the following issue on the godot-ci repository regarding this matter: abarichello/godot-ci#127 (comment)

@HunterNN
Copy link
Contributor Author

HunterNN commented Feb 2, 2024

godotengine/godot#77508

@HunterNN HunterNN self-assigned this Feb 5, 2024
@HunterNN
Copy link
Contributor Author

HunterNN commented Feb 6, 2024

I have tested it further and found that the problem lies more with the shader parameters than the shader itself. I have created an issue on the Godot GitHub repository to report this problem:
godotengine/godot#88033

@HunterNN
Copy link
Contributor Author

HunterNN commented Mar 6, 2024

Godot 4.3 will fix this issue. It is already solved in Godot 4.3 dev 4 (tested with minimal reproduction project).

@HunterNN HunterNN modified the milestones: v0.7.0, v0.8.0 Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working engine
Projects
None yet
Development

No branches or pull requests

2 participants