You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Code simplifications
1. Viewport::get_visible_rect().position is always zero. So Control::get_window_rect is identical to Control::get_global_rect. Remove Control::get_window_rect since it is not used in the source code. 2. sqrt(a * a) = abs(a) for doubles 3. Simplify affine_inverse combination 4. Simplify calculation in shaders
This commit is contained in:
@@ -2866,7 +2866,8 @@ void GI::VoxelGIInstance::update(bool p_update_light_instances, const Vector<RID
|
||||
|
||||
{
|
||||
Transform3D to_cell = gi->voxel_gi_get_to_cell_xform(probe);
|
||||
Transform3D to_probe_xform = (transform * to_cell.affine_inverse()).affine_inverse();
|
||||
Transform3D to_probe_xform = to_cell * transform.affine_inverse();
|
||||
|
||||
//update lights
|
||||
|
||||
for (uint32_t i = 0; i < light_count; i++) {
|
||||
|
||||
Reference in New Issue
Block a user