Explorar o código

Fix multimesh being colored by other nodes GLES3

(cherry picked from commit 92bf4938215f3dd5ca2ac5d9ccee5516c10f5339)
clayjohn %!s(int64=4) %!d(string=hai) anos
pai
achega
a384ffa2b0
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      drivers/gles3/rasterizer_canvas_gles3.cpp

+ 2 - 0
drivers/gles3/rasterizer_canvas_gles3.cpp

@@ -902,6 +902,8 @@ void RasterizerCanvasGLES3::render_batches(Item *p_current_clip, bool &r_reclip,
 								amount = multi_mesh->size;
 							}
 
+							glVertexAttrib4f(VS::ARRAY_COLOR, 1.0, 1.0, 1.0, 1.0);
+
 							for (int j = 0; j < mesh_data->surfaces.size(); j++) {
 								RasterizerStorageGLES3::Surface *s = mesh_data->surfaces[j];
 								// materials are ignored in 2D meshes, could be added but many things (ie, lighting mode, reading from screen, etc) would break as they are not meant be set up at this point of drawing