Round down for nearest filtering in SWGL
Categories
(Core :: Graphics: WebRender, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox76 | --- | fixed |
People
(Reporter: lsalzman, Assigned: lsalzman)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
The OpenGL spec mandates that nearest filtering for texture sampling must use the "Manhattan distance" to find the nearest pixel, which boils down to a floor or truncate (which are the same for positive numbers) on the texture coordinates.
Currently SWGL is using the default rounding mode of round-to-nearest-even (a.k.a. banker's rounding) which is clearly buggy with regards to specified OpenGL behavior...
The OpenGL spec however does mandate that round-to-nearest-even is used on the Z/layer coordinate for indexing into a texture array regardless of filtering, so we need to use different rounding modes for depending on the texture coordinate axis in question.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D69150
Assignee | ||
Updated•5 years ago
|
Comment 4•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e53a045094df
https://hg.mozilla.org/mozilla-central/rev/929cb28d1a1f
Description
•