time was not being set properly with the rest of the uniforms.

This commit is contained in:
Juan Linietsky 2015-03-02 19:21:19 -03:00
parent 440cc5e4b6
commit a0ee5cc353

View file

@ -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)); 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; uses_texpixel_size=shader->uses_texpixel_size;
@ -9083,6 +9078,13 @@ void RasterizerGLES2::_canvas_item_setup_shader_uniforms(CanvasItemMaterial *mat
glActiveTexture(GL_TEXTURE0); 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) { void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list,int p_z,const Color& p_modulate,CanvasLight *p_light) {