X Tutup
Skip to content

Allow baking VoxelGI nodes off the main-thread #116833

Draft
TitanNano wants to merge 2 commits intogodotengine:masterfrom
TitanNano:jovan/voxel_gi_sub_thread_bake
Draft

Allow baking VoxelGI nodes off the main-thread #116833
TitanNano wants to merge 2 commits intogodotengine:masterfrom
TitanNano:jovan/voxel_gi_sub_thread_bake

Conversation

@TitanNano
Copy link
Contributor

@TitanNano TitanNano commented Feb 27, 2026

Implementation of Proposal godotengine/godot-proposals#14243.

VoxelGI::bake runs on and blocks the main thread. This makes it impossible to bake nodes without a visible freeze. It is also impossible to bake multiple nodes in parallel. Most modern machines should be capable of baking more than one VoxelGI node at the same time, which will considerably reduce bake times when doing so at runtime / in-game.


Comparison between sequential baking and parallel baking:

Example project: Sequential Baking of VoxelGI nodes

VoxelGI baking took 205532 milliseconds

Example project: Parallel Baking of VoxelGI Nodes

VoxelGI baking took 3137 milliseconds

When baking more than one VoxelGI node, doing it in parallel is significantly faster. My test with the two example projects was done on an MacBook M1 Pro.


This PR relies on the changes from #116600 and contains the commit from the other PR.

@TitanNano TitanNano force-pushed the jovan/voxel_gi_sub_thread_bake branch from 9df47c9 to 9de2aab Compare February 27, 2026 00:37
@TitanNano TitanNano force-pushed the jovan/voxel_gi_sub_thread_bake branch from 9de2aab to 8165463 Compare February 27, 2026 00:54
@Geometror
Copy link
Member

This is a step into the right direction! We desperately need to implement this mechanism for other lengthy processes as well (such as lightmap baking), the workaround of doing manual Main iterations causes all kinds of issues (see #104392 (comment) for example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow baking VoxelGI nodes off the main-thread

2 participants

X Tutup