"You cannot strengthen the weak by weakening the strong. You cannot help the wage-earner by pulling down the wage-payer. You cannot help the poor by destroying the rich. You cannot help men permanently by doing for them what they could and should do for themselves."
- Abraham Lincoln

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.

[ 0 comments ]