Fixed proper texture binding for sprite material, fixes #13987
This commit is contained in:
parent
c54927a127
commit
c858dbdc4e
2 changed files with 14 additions and 2 deletions
|
@ -1150,7 +1150,7 @@ void RasterizerCanvasGLES3::canvas_render_items(Item *p_item_list, int p_z, cons
|
|||
glBindTexture(t->target, t->tex_id);
|
||||
}
|
||||
|
||||
} else if (!shader_ptr) {
|
||||
} else {
|
||||
state.canvas_shader.set_custom_shader(0);
|
||||
state.canvas_shader.bind();
|
||||
}
|
||||
|
|
|
@ -1541,7 +1541,19 @@ void RasterizerSceneGLES3::_render_geometry(RenderList::Element *e) {
|
|||
|
||||
if (c.texture.is_valid() && storage->texture_owner.owns(c.texture)) {
|
||||
|
||||
const RasterizerStorageGLES3::Texture *t = storage->texture_owner.get(c.texture);
|
||||
RasterizerStorageGLES3::Texture *t = storage->texture_owner.get(c.texture);
|
||||
|
||||
t = t->get_ptr(); //resolve for proxies
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (t->detect_3d) {
|
||||
t->detect_3d(t->detect_3d_ud);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (t->render_target) {
|
||||
t->render_target->used_in_frame = true;
|
||||
}
|
||||
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
glBindTexture(t->target, t->tex_id);
|
||||
restore_tex = true;
|
||||
|
|
Loading…
Reference in a new issue