In HLSL, you can use the built-in fmod function for this. I'm not sure what's going wrong with ... float Mod(float x, float y) { return frac(x / y) * y; }.
確定! 回上一頁