Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for texture mapping into destination image
The [0, 1] uv space was mistakenly mapped to [-1, 511], so in the case where a y uv-coord was exactly 0.0 it would produce a crash. It's now correctly mapped to [0, 511] (or whatever the texture map resolution is). Also the mapping was only done for y, but it should be done for x and y, which I added now. Coincidentially, this seems to fix the "black line" isomap bug (#4), so I uncommented the fix. There will still a few "black" pixels appear around the mouth, which is just because no uv coordinates map there. This fix also makes "square" isomaps work, i.e. when the whole isomap is filled with data, without any borders. It seems like the last row and col of the isomaps don't get filled now, I think this could be because the lookup with Point2f(...) does floor and not round. We can ignore this for now. Thanks to @PhilippKopp for spotting this and helping fix it!
- Loading branch information