diff options
| author | Juan Linietsky <reduzio@gmail.com> | 2018-10-02 09:59:25 -0300 |
|---|---|---|
| committer | Juan Linietsky <reduzio@gmail.com> | 2018-10-02 10:00:15 -0300 |
| commit | bad991ea83fc2b0ae8e1dd58add9ed7802d61045 (patch) | |
| tree | 52a0db96285afebc15c049a672e3d794787a34be /scene | |
| parent | 0b73a9e403a99af7c909908866d2b7822ddf3d44 (diff) | |
| download | redot-engine-bad991ea83fc2b0ae8e1dd58add9ed7802d61045.tar.gz | |
Many more fixes for GLES2 mobile export. Also added ability to turn on OpenGL debugging on Android export.
Diffstat (limited to 'scene')
| -rw-r--r-- | scene/3d/voxel_light_baker.cpp | 3 | ||||
| -rw-r--r-- | scene/3d/voxel_light_baker.h | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/scene/3d/voxel_light_baker.cpp b/scene/3d/voxel_light_baker.cpp index 651a057392..68359eac52 100644 --- a/scene/3d/voxel_light_baker.cpp +++ b/scene/3d/voxel_light_baker.cpp @@ -734,7 +734,8 @@ void VoxelLightBaker::_check_init_light() { leaf_voxel_count = 0; _fixup_plot(0, 0); //pre fixup, so normal, albedo, emission, etc. work for lighting. bake_light.resize(bake_cells.size()); - zeromem(bake_light.ptrw(), bake_light.size() * sizeof(Light)); + print_line("bake light size: " + itos(bake_light.size())); + //zeromem(bake_light.ptrw(), bake_light.size() * sizeof(Light)); first_leaf = -1; _init_light_plot(0, 0, 0, 0, 0, CHILD_EMPTY); } diff --git a/scene/3d/voxel_light_baker.h b/scene/3d/voxel_light_baker.h index 6a1f1253a3..3d55c053f3 100644 --- a/scene/3d/voxel_light_baker.h +++ b/scene/3d/voxel_light_baker.h @@ -92,6 +92,16 @@ private: float accum[6][3]; //rgb anisotropic float direct_accum[6][3]; //for direct bake int next_leaf; + Light() { + x = y = z = 0; + for (int i = 0; i < 6; i++) { + for (int j = 0; j < 3; j++) { + accum[i][j] = 0; + direct_accum[i][j] = 0; + } + } + next_leaf = 0; + } }; int first_leaf; |
