Browse Source

Ensure that 2D meshes use a proper input mask

The input mask was wrongly ignored in earlier versions. Now it is actually used so the input mask variable needs to be a valid number

(cherry picked from commit 777d6ae1c617f3cb711338e745665b6b1837a403)
clayjohn 1 year ago
parent
commit
4cce0d9711
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/gles3/rasterizer_canvas_gles3.cpp

+ 1 - 1
drivers/gles3/rasterizer_canvas_gles3.cpp

@@ -1383,7 +1383,7 @@ void RasterizerCanvasGLES3::_render_batch(Light *p_lights, uint32_t p_index) {
 				GLuint vertex_array_gl = 0;
 				GLuint index_array_gl = 0;
 
-				uint64_t input_mask = 0; // 2D meshes always use the same vertex format.
+				uint64_t input_mask = RS::ARRAY_FORMAT_VERTEX | RS::ARRAY_FORMAT_COLOR | RS::ARRAY_FORMAT_TEX_UV; // 2D meshes always use the same vertex format.
 				if (mesh_instance.is_valid()) {
 					mesh_storage->mesh_instance_surface_get_vertex_arrays_and_format(mesh_instance, j, input_mask, vertex_array_gl);
 				} else {