Skip to content

Commit

Permalink
fix scene_bounding zn/zf generate invalid data
Browse files Browse the repository at this point in the history
  • Loading branch information
junjie020 committed Aug 22, 2024
1 parent 86fc88c commit 3bdae36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ant.shadow_bounding/scene_bounding.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ local function build_scene_info(C, sb)
end

if math3d.aabb_isvalid(PSR) then
si.zn, si.zf = math.max(zn, F.n), math.min(zf, F.f)
si.zn, si.zf = mu.clamp(zn, F.n, F.f), mu.clamp(zf, F.n, F.f)
else
si.zn, si.zf = F.n, F.f
PSR = math3d.minmax(math3d.frustum_points(C.camera.viewprojmat))
Expand Down

0 comments on commit 3bdae36

Please sign in to comment.