"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization."

Particle trimmer updated
Tuesday, July 7, 2009 | Permalink

I have made another update to the particle trimmer. Previous revisions produced somewhat inaccurate results since it didn't take texture filtering into account. For most textures it doesn't matter much, but for low-res textures it can be a big deal. In this revision I've added a subpixel precision mode to deal with this problem (default is a 16x16 split of the area between four texels). As a result a lot more points are added to the convex hull and it now pretty much always has to apply the reduction to 50 vertices. If anyone has an idea of how to do the convex hull reduction other than by brute force I'd like to know. I haven't been able to google up any algorithms for that.

I have also made it handle edge and corner cases correctly.

Name

Comment

Enter the code below