aboutsummaryrefslogtreecommitdiff
path: root/src/fb
diff options
context:
space:
mode:
Diffstat (limited to 'src/fb')
-rw-r--r--src/fb/chfb.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fb/chfb.cpp b/src/fb/chfb.cpp
index 7ac1626..e2355df 100644
--- a/src/fb/chfb.cpp
+++ b/src/fb/chfb.cpp
@@ -126,7 +126,11 @@ void CharacterFrameBuffer::_draw_cropped_triangle(TriangleVertex3 triangle) {
void CharacterFrameBuffer::draw_triangle(TriangleVertex4 triangle) {
face_ind++;
for (auto t1 : triangle.crop_z_out(-1.f, 1.f)) {
- for (auto t2 : t1.div_by_w().crop_xy_out(-1.f, 1.f, -1.f, 1.f)) {
+ auto t1_2 = t1.div_by_w();
+ t1_2.vertex1.point.x *= 2.f;
+ t1_2.vertex2.point.x *= 2.f;
+ t1_2.vertex3.point.x *= 2.f;
+ for (auto t2 : t1_2.crop_xy_out(-1.f, 1.f, -1.f, 1.f)) {
MathVector2 pp1 = t2.vertex1.point.xy(),
pp2 = t2.vertex2.point.xy(),
pp3 = t2.vertex3.point.xy();