From 0103af1ddda6a2aa31227965141dd7d3a513e081 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Thu, 29 Sep 2022 12:53:28 +0300 Subject: Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. --- modules/lightmapper_rd/lightmapper_rd.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/lightmapper_rd') diff --git a/modules/lightmapper_rd/lightmapper_rd.cpp b/modules/lightmapper_rd/lightmapper_rd.cpp index 5b039e65c0..8785f327db 100644 --- a/modules/lightmapper_rd/lightmapper_rd.cpp +++ b/modules/lightmapper_rd/lightmapper_rd.cpp @@ -278,7 +278,7 @@ Lightmapper::BakeError LightmapperRD::_blit_meshes_into_atlas(int p_max_texture_ return BAKE_OK; } -void LightmapperRD::_create_acceleration_structures(RenderingDevice *rd, Size2i atlas_size, int atlas_slices, AABB &bounds, int grid_size, Vector &probe_positions, GenerateProbes p_generate_probes, Vector &slice_triangle_count, Vector &slice_seam_count, RID &vertex_buffer, RID &triangle_buffer, RID &lights_buffer, RID &triangle_cell_indices_buffer, RID &probe_positions_buffer, RID &grid_texture, RID &seams_buffer, BakeStepFunc p_step_function, void *p_bake_userdata) { +void LightmapperRD::_create_acceleration_structures(RenderingDevice *rd, Size2i atlas_size, int atlas_slices, AABB &bounds, int grid_size, Vector &p_probe_positions, GenerateProbes p_generate_probes, Vector &slice_triangle_count, Vector &slice_seam_count, RID &vertex_buffer, RID &triangle_buffer, RID &lights_buffer, RID &triangle_cell_indices_buffer, RID &probe_positions_buffer, RID &grid_texture, RID &seams_buffer, BakeStepFunc p_step_function, void *p_bake_userdata) { HashMap vertex_map; //fill triangles array and vertex array @@ -403,8 +403,8 @@ void LightmapperRD::_create_acceleration_structures(RenderingDevice *rd, Size2i } //also consider probe positions for bounds - for (int i = 0; i < probe_positions.size(); i++) { - Vector3 pp(probe_positions[i].position[0], probe_positions[i].position[1], probe_positions[i].position[2]); + for (int i = 0; i < p_probe_positions.size(); i++) { + Vector3 pp(p_probe_positions[i].position[0], p_probe_positions[i].position[1], p_probe_positions[i].position[2]); bounds.expand_to(pp); } bounds.grow_by(0.1); //grow a bit to avoid numerical error @@ -520,7 +520,7 @@ void LightmapperRD::_create_acceleration_structures(RenderingDevice *rd, Size2i } seams_buffer = rd->storage_buffer_create(sb.size(), sb); - Vector pb = probe_positions.to_byte_array(); + Vector pb = p_probe_positions.to_byte_array(); if (pb.size() == 0) { pb.resize(sizeof(Probe)); } -- cgit v1.2.3