mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Fix raytrace lightmap bake bias
This commit is contained in:
parent
bf47b15e2c
commit
06dd10b390
@ -1687,10 +1687,10 @@ Vector3 VoxelLightBaker::_compute_ray_trace_at_pos(const Vector3 &p_pos, const V
|
|||||||
|
|
||||||
Vector3 direction = normal_xform.xform(axis).normalized();
|
Vector3 direction = normal_xform.xform(axis).normalized();
|
||||||
|
|
||||||
Vector3 pos = p_pos + Vector3(0.5, 0.5, 0.5) + direction * bias;
|
|
||||||
|
|
||||||
Vector3 advance = direction * _get_normal_advance(direction);
|
Vector3 advance = direction * _get_normal_advance(direction);
|
||||||
|
|
||||||
|
Vector3 pos = p_pos /*+ Vector3(0.5, 0.5, 0.5)*/ + advance * bias;
|
||||||
|
|
||||||
uint32_t cell = CHILD_EMPTY;
|
uint32_t cell = CHILD_EMPTY;
|
||||||
|
|
||||||
while (cell == CHILD_EMPTY) {
|
while (cell == CHILD_EMPTY) {
|
||||||
|
Loading…
Reference in New Issue
Block a user