1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Merge pull request #54403 from briansemrau/fix-small-fogvolume

FogVolume don't dispatch compute with zero-dimension groups
This commit is contained in:
Rémi Verschelde
2021-10-31 09:12:10 +01:00
committed by GitHub
2 changed files with 13 additions and 0 deletions

View File

@@ -3954,6 +3954,10 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
kernel_size = Vector3i(int32_t(rb->volumetric_fog->width), int32_t(rb->volumetric_fog->height), int32_t(rb->volumetric_fog->depth));
}
if (kernel_size.x == 0 || kernel_size.y == 0 || kernel_size.z == 0) {
continue;
}
volumetric_fog.push_constant.position[0] = position.x;
volumetric_fog.push_constant.position[1] = position.y;
volumetric_fog.push_constant.position[2] = position.z;