Skip to content

Commit

Permalink
Merge pull request #48647 from lawnjelly/ewok_2d_skin_unrigged
Browse files Browse the repository at this point in the history
Batching - fallback for 2d skinning with unrigged polys.
  • Loading branch information
akien-mga authored May 13, 2021
2 parents fcfce4b + 3c68a6d commit 009a738
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions drivers/gles_common/rasterizer_canvas_batcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -1881,17 +1881,23 @@ PREAMBLE(bool)::_software_skin_poly(RasterizerCanvas::Item::CommandPolygon *p_po
}
}

// software transform with combined matrix?
if (p_fill_state.transform_mode != TM_NONE) {
for (int n = 0; n < num_verts; n++) {
Vector2 &dst_pos = pTemps[n];
_software_transform_vertex(dst_pos, p_fill_state.transform_combined);
}
}

} // if bone format matches
else {
// not supported
// not rigged properly, just copy the verts directly
for (int n = 0; n < num_verts; n++) {
const Vector2 &src_pos = p_poly->points[n];
Vector2 &dst_pos = pTemps[n];

dst_pos = src_pos;
}
}

// software transform with combined matrix?
if (p_fill_state.transform_mode != TM_NONE) {
for (int n = 0; n < num_verts; n++) {
Vector2 &dst_pos = pTemps[n];
_software_transform_vertex(dst_pos, p_fill_state.transform_combined);
}
}

// output to the batch verts
Expand Down

0 comments on commit 009a738

Please sign in to comment.