GLSL float type is limited to 32 bits, while Date.now() returns 64-bit double type.
As using doubles in GLSL is generally undesirable, setting a reference time point to subtract for subsequent Date.now() calls seems to be natural option.
Using global runtime-adjusted time might be considered also.
GLSL
float
type is limited to 32 bits, while Date.now() returns 64-bit double type.As using doubles in GLSL is generally undesirable, setting a reference time point to subtract for subsequent
Date.now()
calls seems to be natural option.Using global runtime-adjusted time might be considered also.