diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2020-04-29 22:34:09 +0200 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2020-04-30 11:42:11 +0200 |
commit | f7706659b560ad2c4453f69551c3f6115c93364a (patch) | |
tree | 574cae14b4123413a2d73fc86e7cf50165194162 /drivers | |
parent | 92d4a0cbd231508221b0e977ae9a0e9d4207e328 (diff) |
Improve shader time roll over
- Resurrect it for GL ES 2
- Add it to the Vulkan rasterizer
- Expose the setting from the `RenderingServer`, since it does not belong in any specific rasterizer
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles2/rasterizer_gles2.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index 37b729d568..28f06f939c 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -277,9 +277,8 @@ void RasterizerGLES2::begin_frame(double frame_step) { frame_step = 0.001; } - // double time_roll_over = GLOBAL_GET("rendering/limits/time/time_rollover_secs"); - // if (time_total > time_roll_over) - // time_total = 0; //roll over every day (should be customz + double time_roll_over = GLOBAL_GET("rendering/limits/time/time_rollover_secs"); + time_total = Math::fmod(time_total, time_roll_over); storage->frame.time[0] = time_total; storage->frame.time[1] = Math::fmod(time_total, 3600); |