mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1853573 - Implement vec2_scalar fract() in swgl. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D188818
This commit is contained in:
parent
c52cbf9d05
commit
0694aeb5d3
@ -753,6 +753,8 @@ Float fract(Float v) { return v - floor(v); }
|
||||
|
||||
vec2 fract(vec2 v) { return vec2(fract(v.x), fract(v.y)); }
|
||||
|
||||
vec2_scalar fract(vec2_scalar v) { return vec2_scalar(fract(v.x), fract(v.y)); }
|
||||
|
||||
// X derivatives can be approximated by dFdx(x) = x[1] - x[0].
|
||||
// Y derivatives are not easily available since we operate in terms of X spans
|
||||
// only. To work around, assume dFdy(p.x) = dFdx(p.y), which only holds for
|
||||
|
Loading…
Reference in New Issue
Block a user