mirror of
https://github.com/godotengine/godot.git
synced 2024-11-11 06:33:10 +00:00
Merge pull request #47994 from lawnjelly/ewok_cope_broken_shader
Batching - Don't join items with invalid shaders
This commit is contained in:
commit
41a3b98f2b
@ -1356,6 +1356,12 @@ bool RasterizerCanvasGLES2::try_join_item(Item *p_ci, RenderItemState &r_ris, bo
|
||||
if (material_ptr) {
|
||||
shader_ptr = material_ptr->shader;
|
||||
|
||||
// special case, if the user has made an error in the shader code
|
||||
if (shader_ptr && !shader_ptr->valid) {
|
||||
join = false;
|
||||
r_batch_break = true;
|
||||
}
|
||||
|
||||
if (shader_ptr && shader_ptr->mode != VS::SHADER_CANVAS_ITEM) {
|
||||
shader_ptr = NULL; // not a canvas item shader, don't use.
|
||||
}
|
||||
|
@ -1754,6 +1754,12 @@ bool RasterizerCanvasGLES3::try_join_item(Item *p_ci, RenderItemState &r_ris, bo
|
||||
if (material_ptr) {
|
||||
shader_ptr = material_ptr->shader;
|
||||
|
||||
// special case, if the user has made an error in the shader code
|
||||
if (shader_ptr && !shader_ptr->valid) {
|
||||
join = false;
|
||||
r_batch_break = true;
|
||||
}
|
||||
|
||||
if (shader_ptr && shader_ptr->mode != VS::SHADER_CANVAS_ITEM) {
|
||||
shader_ptr = NULL; // not a canvas item shader, don't use.
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user