diff --git a/gl/cogl-texture.c b/gl/cogl-texture.c index 06ba7aece..2b25fafc0 100644 --- a/gl/cogl-texture.c +++ b/gl/cogl-texture.c @@ -2519,9 +2519,9 @@ _cogl_multitexture_unsliced_quad (float x_1, out_tex_coords[0] = out_tex_coords[0] * (x_span->size - x_span->waste) / x_span->size; out_tex_coords[1] = - out_tex_coords[1] * (x_span->size - x_span->waste) / x_span->size; + out_tex_coords[1] * (y_span->size - y_span->waste) / y_span->size; out_tex_coords[2] = - out_tex_coords[2] * (y_span->size - y_span->waste) / y_span->size; + out_tex_coords[2] * (x_span->size - x_span->waste) / x_span->size; out_tex_coords[3] = out_tex_coords[3] * (y_span->size - y_span->waste) / y_span->size; diff --git a/gles/cogl-texture.c b/gles/cogl-texture.c index 1300b1f9f..661af232f 100644 --- a/gles/cogl-texture.c +++ b/gles/cogl-texture.c @@ -2634,9 +2634,9 @@ _cogl_multitexture_unsliced_quad (float x1, out_tex_coords[0] = out_tex_coords[0] * (x_span->size - x_span->waste) / x_span->size; out_tex_coords[1] = - out_tex_coords[1] * (x_span->size - x_span->waste) / x_span->size; + out_tex_coords[1] * (y_span->size - y_span->waste) / y_span->size; out_tex_coords[2] = - out_tex_coords[2] * (y_span->size - y_span->waste) / y_span->size; + out_tex_coords[2] * (x_span->size - x_span->waste) / x_span->size; out_tex_coords[3] = out_tex_coords[3] * (y_span->size - y_span->waste) / y_span->size; }