-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix rendering images with nearest sampling and 2^n size (#11162)
* Added render tests for image with a power of 2 size * Added nearest resampling, test is failing * Fix by disabling mipmaps * Keeping same behavior with linear sampling * Correcting expected.ping to use nearest filtering * Adding check for useMipMap * Refactoring * Removing third argument from * Fix broken refactoring * Removing stray console.log * Readd mipmaps * minor refactor * Mipmaps with nearest
- Loading branch information
1 parent
1cf7180
commit 309c54b
Showing
8 changed files
with
43 additions
and
17 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
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
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions
29
test/integration/render-tests/image/power-of-two/style.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"width": 256, | ||
"height": 256 | ||
} | ||
}, | ||
"center": [34.5, 54.5], | ||
"zoom": 6, | ||
"sources": { | ||
"image": { | ||
"type": "image", | ||
"coordinates": [[34, 55], [35, 55], [35, 54], [34, 54]], | ||
"url": "local://image/256.png" | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "image", | ||
"type": "raster", | ||
"source": "image", | ||
"paint": { | ||
"raster-fade-duration": 0, | ||
"raster-resampling": "nearest" | ||
} | ||
} | ||
] | ||
} |