fix depth clipping in perspective view
The depth range is now set slightly differently. Both ends of the range are shifted for each layer to solve some precision issues. Some layers draw multiple things at different depths. For example, fill layers draw fills and antialiasing separately. To handle this case, I added setDepthSublayer(n) which a
This commit is contained in:
@@ -39,7 +39,7 @@ void TransformState::getProjMatrix(mat4& projMatrix) const {
|
||||
matrix::rotate_z(projMatrix, projMatrix, getAngle());
|
||||
|
||||
matrix::translate(projMatrix, projMatrix, pixel_x() - getWidth() / 2.0f,
|
||||
pixel_y() - getWidth() / 2.0f, 0);
|
||||
pixel_y() - getHeight() / 2.0f, 0);
|
||||
}
|
||||
|
||||
box TransformState::cornersToBox(uint32_t z) const {
|
||||
|
||||
Reference in New Issue
Block a user