ad044 / LainTSX

WebGL implementation of the Serial Experiments Lain PSX game
GNU General Public License v3.0
479 stars 25 forks source link

Using time reference value to fit in 32bit float. #1

Closed iamtakingiteasy closed 4 years ago

iamtakingiteasy commented 4 years ago

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.