You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Use resize_zeroed instead of resize then fill(0) in several places.
This commit is contained in:
@@ -437,8 +437,7 @@ void Fog::VolumetricFog::init(const Vector3i &fog_size, RID p_sky_shader) {
|
||||
|
||||
#if defined(MACOS_ENABLED) || defined(IOS_ENABLED)
|
||||
Vector<uint8_t> dm;
|
||||
dm.resize(fog_size.x * fog_size.y * fog_size.z * 4);
|
||||
dm.fill(0);
|
||||
dm.resize_zeroed(fog_size.x * fog_size.y * fog_size.z * 4);
|
||||
|
||||
density_map = RD::get_singleton()->storage_buffer_create(dm.size(), dm);
|
||||
RD::get_singleton()->set_resource_name(density_map, "Fog density map");
|
||||
|
||||
Reference in New Issue
Block a user