Skip to content

Commit

Permalink
Re-fix Disabling Half Floats on iOS
Browse files Browse the repository at this point in the history
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
  • Loading branch information
The-O-King committed Feb 6, 2022
1 parent a086a61 commit bf5b2f4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gles2/rasterizer_storage_gles2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bf5b2f4

Please sign in to comment.