Skip to content

Commit dfa22ce

Browse files
committed
Batcher HZB Culling more conservative mip level selection
1 parent f4e2050 commit dfa22ce

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

h3d/scene/Batcher.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ private class BatchCommandBuilder extends hxsl.Shader {
708708
var texelSize = vec2(boxWidth, boxHeight) * hzbSize;
709709
var w = max(texelSize.x, texelSize.y);
710710

711-
var mip = floor(log2(w));
711+
var mip = ceil(log2(w));
712712
var mipSize = max(vec2(1.0), floor(hzbSize / pow(vec2(2.0), vec2(mip))));
713713

714714
var depth = 0.0;

0 commit comments

Comments
 (0)