From ca67b2bce19919bcf8a444fb240657707430a3d9 Mon Sep 17 00:00:00 2001 From: Omar El Sheikh Date: Sat, 5 Feb 2022 21:06:09 -0500 Subject: [PATCH] Re-fix Disabling Half Floats on iOS A previous change missed setting a flag that specified whether half floats were being used on vertex positions when in the GLES2 driver This caused errors with the vertex buffer when platforms (specifically iOS) which do not properly support half float vertex attributes on GLES2, try to remapt the vertex buffer to stop using half floats (in this case that remapping never happened and caused artifacts) Re-enable setting that flag to fix rendering issues on these platforms (cherry picked from commit bf5b2f48e6100d939954312f5185f9366eeb2363) --- drivers/gles2/rasterizer_storage_gles2.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index 8e0fdcd4cba..e43b10fa55c 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -2287,6 +2287,7 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS: if (p_format & VS::ARRAY_COMPRESS_VERTEX) { attribs[i].type = _GL_HALF_FLOAT_OES; positions_stride += attribs[i].size * 2; + uses_half_float = true; } else { attribs[i].type = GL_FLOAT; positions_stride += attribs[i].size * 4;