summaryrefslogtreecommitdiff
path: root/drivers/gles2
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-03-02 19:21:19 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-03-02 19:21:46 -0300
commita0ee5cc3531786a652ee43d3a57cb69dff34bd70 (patch)
treee116359be9543839f1296f2669622c87e8ba1b0e /drivers/gles2
parent440cc5e4b6af1720243cff19f3b8d805b82e9260 (diff)
time was not being set properly with the rest of the uniforms.
Diffstat (limited to 'drivers/gles2')
-rw-r--r--drivers/gles2/rasterizer_gles2.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp
index aa7bad0b8f..e167b647e7 100644
--- a/drivers/gles2/rasterizer_gles2.cpp
+++ b/drivers/gles2/rasterizer_gles2.cpp
@@ -9023,11 +9023,6 @@ void RasterizerGLES2::_canvas_item_setup_shader_params(CanvasItemMaterial *mater
canvas_shader.set_uniform(CanvasShaderGLES2::SCREEN_UV_MULT,Vector2(1.0/viewport.width,1.0/viewport.height));
}
- if (shader->uses_time) {
- canvas_shader.set_uniform(CanvasShaderGLES2::TIME,Math::fmod(last_time,300.0));
- draw_next_frame=true;
- }
- //if uses TIME - draw_next_frame=true
uses_texpixel_size=shader->uses_texpixel_size;
@@ -9083,6 +9078,13 @@ void RasterizerGLES2::_canvas_item_setup_shader_uniforms(CanvasItemMaterial *mat
glActiveTexture(GL_TEXTURE0);
}
+ if (shader->uses_time) {
+ canvas_shader.set_uniform(CanvasShaderGLES2::TIME,Math::fmod(last_time,300.0));
+ draw_next_frame=true;
+ }
+ //if uses TIME - draw_next_frame=true
+
+
}
void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list,int p_z,const Color& p_modulate,CanvasLight *p_light) {