Note: #3084, where the group decided to keep interpolation of the perspective property and the perspective() transform function different, is relevant background to this issue. Because of that decision, this issue applies only to the perspective() transform function and not to the perspective property.
The rules for interpolation of perspective say that perspective() functions are interpolated as matrices.
The definition of the perspective() function says:
If the depth value is less than 1px, it must be treated as 1px for the purpose of rendering.
It's not clear how this affects interpolation, since "for the purpose of rendering" probably doesn't include interpolation. However, since perspective values less than 1px rapidly lead the relevant component of the matrix to approach infinity, an animation from perspective(0) to some other perspective() value will spend most of its time between 0 and 1px, which probably isn't desirable.
It seems like it's probably useful to say that the clamping to 1px also affects interpolation endpoints, so that this doesn't happen. I think this would also be helpful for implementations since they don't need to worry about handling infinite or near-infinite values in matrices (like in Chromium issue 1205161, which is how I ended up here in the first place). On the other hand, it does add extra rules for handling what is basically an error case.
I'm curious what other folks think here. cc: @smfr @mattwoodrow @birtles.
Note: #3084, where the group decided to keep interpolation of the
perspectiveproperty and theperspective()transform function different, is relevant background to this issue. Because of that decision, this issue applies only to theperspective()transform function and not to theperspectiveproperty.The rules for interpolation of
perspectivesay thatperspective()functions are interpolated as matrices.The definition of the
perspective()function says:It's not clear how this affects interpolation, since "for the purpose of rendering" probably doesn't include interpolation. However, since perspective values less than 1px rapidly lead the relevant component of the matrix to approach infinity, an animation from
perspective(0)to some otherperspective()value will spend most of its time between0and1px, which probably isn't desirable.It seems like it's probably useful to say that the clamping to
1pxalso affects interpolation endpoints, so that this doesn't happen. I think this would also be helpful for implementations since they don't need to worry about handling infinite or near-infinite values in matrices (like in Chromium issue 1205161, which is how I ended up here in the first place). On the other hand, it does add extra rules for handling what is basically an error case.I'm curious what other folks think here. cc: @smfr @mattwoodrow @birtles.