diff --git a/fyrox-impl/src/renderer/bundle.rs b/fyrox-impl/src/renderer/bundle.rs index c1e815ab6..b071bd84c 100644 --- a/fyrox-impl/src/renderer/bundle.rs +++ b/fyrox-impl/src/renderer/bundle.rs @@ -435,6 +435,12 @@ impl RenderDataBundle { write_shader_values(shader_property_group, &mut buf) } + if buf.is_empty() { + // There's no need to upload empty uniform blocks. Empty uniform blocks will be + // optimized out anyway. + continue; + } + material_property_group_blocks.push(( resource_definition.binding, render_context.uniform_memory_allocator.allocate(buf),