Commit 51066fcd by Juan Linietsky Committed by GitHub

Merge pull request #10305 from H4kor/gles3

Fixes a bug in multimesh_instance_get_color
parents c109a6e5 5d2b059d
......@@ -3963,7 +3963,7 @@ Color RasterizerStorageGLES3::multimesh_instance_get_color(RID p_multimesh, int
ERR_FAIL_COND_V(multimesh->color_format == VS::MULTIMESH_COLOR_NONE, Color());
int stride = multimesh->color_floats + multimesh->xform_floats;
float *dataptr = &multimesh->data[stride * p_index + multimesh->color_floats];
float *dataptr = &multimesh->data[stride * p_index + multimesh->xform_floats];
if (multimesh->color_format == VS::MULTIMESH_COLOR_8BIT) {
union {
......@@ -3971,6 +3971,8 @@ Color RasterizerStorageGLES3::multimesh_instance_get_color(RID p_multimesh, int
float colf;
} cu;
cu.colf = dataptr[0];
return Color::hex(BSWAP32(cu.colu));
} else if (multimesh->color_format == VS::MULTIMESH_COLOR_FLOAT) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment