@@ -1973,8 +1973,8 @@ render_repeat_node (GskGLRenderer *self,
|
||||
ops_set_texture (builder, region.texture_id);
|
||||
|
||||
op = ops_begin (builder, OP_CHANGE_REPEAT);
|
||||
op->child_bounds[0] = 0; /* Both currently unused */
|
||||
op->child_bounds[1] = 0;
|
||||
op->child_bounds[0] = (node->bounds.origin.x - child_bounds->origin.x) / child_bounds->size.width;
|
||||
op->child_bounds[1] = (node->bounds.origin.y - child_bounds->origin.y) / child_bounds->size.height;
|
||||
op->child_bounds[2] = node->bounds.size.width / child_bounds->size.width;
|
||||
op->child_bounds[3] = node->bounds.size.height / child_bounds->size.height;
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ void main() {
|
||||
float mapped_x = (vUv.x - u_texture_rect.x) / tw;
|
||||
float mapped_y = (vUv.y - u_texture_rect.y) / th;
|
||||
|
||||
float wrapped_x = wrap(mapped_x * u_child_bounds.z, 1.0);
|
||||
float wrapped_y = wrap(mapped_y * u_child_bounds.w, 1.0);
|
||||
float wrapped_x = u_child_bounds.x + wrap(mapped_x * u_child_bounds.z, 1.0);
|
||||
float wrapped_y = u_child_bounds.y + wrap(mapped_y * u_child_bounds.w, 1.0);
|
||||
|
||||
vec2 tp;
|
||||
tp.x = u_texture_rect.x + (wrapped_x * tw);
|
||||
|
||||
Reference in New Issue
Block a user