Skip to content

Commit 0af15b7

Browse files
committed
#18 remove unused code
1 parent b9fcb39 commit 0af15b7

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

Sources/vger/vger.metal

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -113,27 +113,6 @@ kernel void vger_bounds(uint gid [[thread_position_in_grid]],
113113
}
114114
}
115115

116-
/// Removes a prim if its texture region is outside the rendered geometry.
117-
kernel void vger_prune(uint gid [[thread_position_in_grid]],
118-
device vgerPrim* prims,
119-
const device float2* cvs,
120-
constant uint& primCount) {
121-
122-
if(gid < primCount) {
123-
device auto& prim = prims[gid];
124-
125-
auto center = 0.5 * (prim.texBounds[0] + prim.texBounds[1]);
126-
auto tile_size = prim.texBounds[1] - prim.texBounds[0];
127-
128-
if(sdPrim(prim, cvs, center) > max(tile_size.x, tile_size.y) * 0.5 * SQRT_2) {
129-
float2 big = {FLT_MAX, FLT_MAX};
130-
prim.quadBounds[0] = big;
131-
prim.quadBounds[1] = big;
132-
}
133-
134-
}
135-
}
136-
137116
vertex VertexOut vger_vertex(uint vid [[vertex_id]],
138117
uint iid [[instance_id]],
139118
const device vgerPrim* prims,

0 commit comments

Comments
 (0)