Browse Source

Fixup SDFGI shader compilation error after #80390

My mistake, I added this when rebasing and didn't notice that it was a
.glsl file and thus the availability of Math was not confirmed by the
C++ compiler.
Rémi Verschelde 1 year ago
parent
commit
7abaac631b

+ 1 - 1
servers/rendering/renderer_rd/shaders/environment/sdfgi_preprocess.glsl

@@ -1033,7 +1033,7 @@ void main() {
 
 
 	if (local == ivec3(0) && store_position_count > 0) {
 	if (local == ivec3(0) && store_position_count > 0) {
 		store_from_index = atomicAdd(dispatch_data.total_count, store_position_count);
 		store_from_index = atomicAdd(dispatch_data.total_count, store_position_count);
-		uint group_count = Math::division_round_up(store_from_index + store_position_count, 64);
+		uint group_count = (store_from_index + store_position_count - 1) / 64 + 1;
 		atomicMax(dispatch_data.x, group_count);
 		atomicMax(dispatch_data.x, group_count);
 	}
 	}