Skip to content

Commit

Permalink
Batching - fix basis polarity in large fvf
Browse files Browse the repository at this point in the history
Slight technical hitch, the basis was reversed that was sent to the shader, so rotations were opposite. This PR reverses polarity of the basis to be correct.
  • Loading branch information
lawnjelly committed Mar 11, 2021
1 parent 13a57d8 commit f723fa6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gles_common/rasterizer_canvas_batcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -2061,9 +2061,9 @@ bool C_PREAMBLE::_prefill_rect(RasterizerCanvas::Item::CommandRect *rect, FillSt
const Transform2D &tr = r_fill_state.transform_combined;

pBT[0].translate.set(tr.elements[2]);
// could do swizzling in shader?
pBT[0].basis[0].set(tr.elements[0][0], tr.elements[1][0]);
pBT[0].basis[1].set(tr.elements[0][1], tr.elements[1][1]);

pBT[0].basis[0].set(tr.elements[0][0], tr.elements[0][1]);
pBT[0].basis[1].set(tr.elements[1][0], tr.elements[1][1]);

pBT[1] = pBT[0];
pBT[2] = pBT[0];
Expand Down

0 comments on commit f723fa6

Please sign in to comment.