Should we have some tests to go along with this? For example, what is the expected value of "frac(-2.25)"? GLSL defines "fract(x)" as equivalent to "x - floor(x)"; I'm not sure that necessarily matches HLSL/D3D, and this seems a nice occasion to find out.