You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #89281 from permelin/fix-lm-capture-octant
Fix lightmap captures not applied in one octant
This commit is contained in:
@@ -2053,7 +2053,7 @@ void RendererSceneCull::_update_instance_lightmap_captures(Instance *p_instance)
|
|||||||
|
|
||||||
Vector3 inner_pos = ((lm_pos - bounds.position) / bounds.size) * 2.0 - Vector3(1.0, 1.0, 1.0);
|
Vector3 inner_pos = ((lm_pos - bounds.position) / bounds.size) * 2.0 - Vector3(1.0, 1.0, 1.0);
|
||||||
|
|
||||||
real_t blend = MAX(inner_pos.x, MAX(inner_pos.y, inner_pos.z));
|
real_t blend = MAX(ABS(inner_pos.x), MAX(ABS(inner_pos.y), ABS(inner_pos.z)));
|
||||||
//make blend more rounded
|
//make blend more rounded
|
||||||
blend = Math::lerp(inner_pos.length(), blend, blend);
|
blend = Math::lerp(inner_pos.length(), blend, blend);
|
||||||
blend *= blend;
|
blend *= blend;
|
||||||
|
|||||||
Reference in New Issue
Block a user