1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-17 14:11:06 +00:00

Fix Occlusion Culling not working for an orthogonal camera.

This commit is contained in:
Rudolph Bester
2024-10-26 20:07:34 +02:00
parent 61accf0605
commit 76c20383d1
2 changed files with 2 additions and 2 deletions

View File

@@ -140,7 +140,7 @@ void RaycastOcclusionCull::RaycastHZBuffer::_generate_camera_rays(const CameraRa
Vector3 dir;
if (p_data->camera_orthogonal) {
dir = -p_data->camera_dir;
dir = p_data->camera_dir;
tile.ray.org_x[j] = pixel_pos.x - dir.x * p_data->z_near;
tile.ray.org_y[j] = pixel_pos.y - dir.y * p_data->z_near;
tile.ray.org_z[j] = pixel_pos.z - dir.z * p_data->z_near;