message: use only 16 hi-z samples
diff: @@ -92,16 +92,19 @@ bool bboxTest(const uint objId) {
  ibbox[1] = ivec2(ceil(bbox[1].xy*hiZsize));
  ivec2 sz = ibbox[1]-ibbox[0];
  + bool visible = false;
  +
  + const uint maxHiZSamples = 16;
  + if(laneID<maxHiZSamples) {
  [[dont_unroll]]
  - while(sz.x*sz.y>gl_WorkGroupSize.x) {
  + while(sz.x*sz.y>maxHiZSamples) {
  ibbox[0] = ibbox[0]/2;
  ibbox[1] = (ibbox[1]+ivec2(1))/2;
  sz = ibbox[1]-ibbox[0];
  mip++;
  }
  - bool visible = false;
  - if(sz.x>0) {
  + if(0<sz.x) {
  ivec2 offset = ivec2(laneID%sz.x,laneID/sz.x);
  ivec2 at = ibbox[0]+offset;
  if(offset.y<sz.y) {
  @@ -112,6 +115,7 @@ bool bboxTest(const uint objId) {
  visible = true;
  }
  }
  + }
  visible = workgroupAny(visible);
  return visible;
  