GLES2 Batching fix canvas texscreen (SCREEN_TEXTURE)

When reading SCREEN_TEXTURE in a shader, this previously only worked succesfully for the first read of the screen, because state.canvas_texscreen_used was never getting reset. This PR resets state.canvas_texscreen_used at the beginning of each joined item, so that further screen reads can happen.
This commit is contained in:
lawnjelly 2020-04-25 13:32:28 +01:00
parent 5d5848d2b1
commit a75c1ed1df
1 changed files with 4 additions and 0 deletions

View File

@ -2492,6 +2492,10 @@ void RasterizerCanvasGLES2::render_joined_item(const BItemJoined &p_bij, RenderI
} }
#endif #endif
// this must be reset for each joined item,
// it only exists to prevent capturing the screen more than once per item
state.canvas_texscreen_used = false;
// all the joined items will share the same state with the first item // all the joined items will share the same state with the first item
Item *ci = bdata.item_refs[p_bij.first_item_ref].item; Item *ci = bdata.item_refs[p_bij.first_item_ref].item;