-
-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Effects > Transform > Perspective: custom foreshortening now available
Relates to #454 . Thank you to @martin19 for the suggestion! PhotoDemon's Perspective transform now provides custom control over x and y foreshortening (independently). This is accomplished by modifying reverse-mapped x/y coordinates on an exponential scale *after* the perspective transform is performed (which means I didn't have to mess with the perspective math itself - a good thing, since that math is already complicated!) . When active, this does incur a performance penalty because Pow() math is slow, but I have rewritten the central perspective calculation with branches to avoid this penalty when the user is *not* using custom foreshortening. PD's central support class needed modifications to make this work while various edge-wrapping modes are active (particularly wrap and reflect), so it was also touched in this commit. The Perspective tool UI also had to be adjusted to make room for new sliders. (One other note - another reason for me to handle foreshortening this way in PD is that the tool's quality slider still behaves correctly while custom foreshortening is active, because we can still supersample correctly across all edge-behavior modes).
- Loading branch information
1 parent
d71a300
commit 27f6d12
Showing
3 changed files
with
441 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.