3 ms·
> But since a texcoord can be negative, your modulo operation has to account for that Is that the fmod(fmod(a, b) + b, b) thing, or something else? I still wis
by TazeTSchnitzel 9y ago
> But since a texcoord can be negative, your modulo operation has to account for that
Is that the fmod(fmod(a, b) + b, b) thing, or something else? I still wish that was the default behaviour in more languages…
- sillysaurus3 9y agoIf you like this kind of thing, http://chrishecker.com/Miscellaneous_Technical_Articles http://chrishecker.com/Miscellaneous_Technical_Articles is an excellent resource. It points out all of the fiendish corner cases lurking in a standard rasterizer. http://chrishecker.com/images/9/97/Gdmtex2.pdf http://chrishecker.com/images/9/97/Gdmtex2.pdf page 21 has a correct FloorDivMod function.