浏览代码

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
Omar El Sheikh 3 年之前
父节点
当前提交
bf5b2f48e6
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/gles2/rasterizer_storage_gles2.cpp

+ 1 - 0
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) {
 				if (p_format & VS::ARRAY_COMPRESS_VERTEX) {
 					attribs[i].type = _GL_HALF_FLOAT_OES;
 					attribs[i].type = _GL_HALF_FLOAT_OES;
 					positions_stride += attribs[i].size * 2;
 					positions_stride += attribs[i].size * 2;
+					uses_half_float = true;
 				} else {
 				} else {
 					attribs[i].type = GL_FLOAT;
 					attribs[i].type = GL_FLOAT;
 					positions_stride += attribs[i].size * 4;
 					positions_stride += attribs[i].size * 4;