Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TextureTools: make distanceField() work better on bad/old shader comp…
…ilers. The nested for loop is a big problem. Worked around this by putting a fixed upper bound and some `break`s. This might result in the code being slower on desktop drivers, needs to be redone from scratch later by generating the code directly. Even this minor change caused Mesa drivers to output a slightly different file. Test output is verbatim below: ============================================================================ FAIL [1] test() at ../src/Magnum/TextureTools/Test/DistanceFieldGLTest.cpp on line 107 Images actualOutputImage and Utility::Directory::join(DISTANCEFIELDGLTEST_FILES_DIR, "output.tga") have both max and mean delta above threshold, actual 1/0.000488281 but at most 0/0 expected. Delta image: | | | | | | | | | | | | | | | | | | | | | | | M | | | | | | M | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pixels above max/mean threshold: [16,41] Vector(175), expected Vector(174) (Δ = 1) [46,35] Vector(175), expected Vector(174) (Δ = 1)
- Loading branch information