From 32d98cdd708f1f8a15c71472378eb1ec006b016c Mon Sep 17 00:00:00 2001 From: Try Date: Tue, 15 Oct 2024 19:55:57 +0200 Subject: [PATCH] fixup vms cluster culling #681 --- shader/virtual_shadow/vsm_cluster_task.comp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shader/virtual_shadow/vsm_cluster_task.comp b/shader/virtual_shadow/vsm_cluster_task.comp index 2d1fe80ed..b584cd04b 100644 --- a/shader/virtual_shadow/vsm_cluster_task.comp +++ b/shader/virtual_shadow/vsm_cluster_task.comp @@ -242,7 +242,7 @@ bool pageHiZTest(vec4 aabb, float depthMax, const ivec3 at, const ivec2 sz) { aabb = aabb*0.5+0.5; // [0..1] aabb = aabb*VSM_PAGE_TBL_SIZE; - ivec4 iaabb = ivec4(ivec2(floor(aabb.xy)), ivec2(ceil(aabb.zw))+1); + ivec4 iaabb = ivec4(ivec2(aabb.xy), ivec2(aabb.zw)+1); iaabb.xy = max(iaabb.xy, ivec2(at.xy)); iaabb.zw = min(iaabb.zw, ivec2(at.xy+sz)); iaabb.zw = min(iaabb.zw, ivec2(VSM_PAGE_TBL_SIZE));