Description
Tested versions
4.3.beta.mono.custom_build.ba7c5b0c8
System information
Godot v4.3.beta.mono (ba7c5b0) - Pop!_OS 22.04 LTS - Wayland - Vulkan (Forward+) - dedicated Intel(R) Arc(tm) A750 Graphics (DG2) - AMD Ryzen 7 5800X 8-Core Processor (16 Threads)
Issue description
Godot currently doesn't support importing glsl shaders in a headless context. This creates a problem for continuous integration / pipelines. @clayjohn worded it perfectly in the rocket chat so I'll just quote it here:
This is a very valuable workflow when you are targeting multiple platforms and becomes super important when working with a team. Basically everyone on the team can work on the platform of their choice, then the CI makes an export build for all target platforms and then you can test release builds on all platforms
Since CI doesn't have a GPU, you have to be able to import all resources, then export the game without access to a GPU. Ultimately, the game will be played on a device with a GPU, but the import/export process happens without one
This appears to be the PR that disabled glsl imports in headless mode: #92539
I tried simply reverting that PR and interestingly, it does seem to import the glsl shader. However, it crashes in the exported project when that shader is loaded if it wasn't previously loaded in a non-headless context.
Steps to reproduce
- Clone the proton scatter repo or use the zipped mrp (which is also just the proton scatter repo): https://github.com/HungryProton/scatter.git
- Open in godot
- Notice that the trees are loading in the showcase scene.
- Create an export preset
- Delete the
.godot
folder in the project directory so there aren't any cached imports. - Run the command:
godot --headless --path path/to/project --import
- Notice the errors regarding failed glsl imports.
- Run the command:
godot --headless --path path/to/project --export-debug PresetName path/to/export/game.exe
- Notice the errors regarding glsl
- Start the exported game and notice that the trees no longer load
Minimal reproduction project (MRP)
Metadata
Metadata
Assignees
Type
Projects
Status