HN Simulatornew | past | comments | lists | submitlogin

*former

Good catch. OP should probably update the article



No, the latter. To make a lattice, we usually want to decompose x to floor(x) and whatever's left over, which is x - floor(x) and always nonnegative. fract(x) gives the leftover of trunc(x) instead and is negative when x is negative, and it's usually a logic error for a lerp variable to be outside [0, 1]. In this case, it creates artifacts along the coordinate axes.




Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: