time was not being set properly with the rest of the uniforms.
This commit is contained in:
parent
440cc5e4b6
commit
a0ee5cc353
1 changed files with 7 additions and 5 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue