update triangle graphics ref tests with yet a few more variations
|
@ -2318,7 +2318,34 @@ fn draw_triangles(dest: &mut IndexedBitmap, mode: TriangleType, texture: Option<
|
||||||
let scale = Matrix3x3::new_2d_scaling(scale_factor, scale_factor);
|
let scale = Matrix3x3::new_2d_scaling(scale_factor, scale_factor);
|
||||||
let triangles = get_quad(mode, texture, blendmap, scale * Matrix3x3::new_2d_translation(220.0, 20.0), top_left, top_right, bottom_left, bottom_right);
|
let triangles = get_quad(mode, texture, blendmap, scale * Matrix3x3::new_2d_translation(220.0, 20.0), top_left, top_right, bottom_left, bottom_right);
|
||||||
dest.triangle_list_2d(&triangles);
|
dest.triangle_list_2d(&triangles);
|
||||||
|
|
||||||
|
// other downscaled sizes
|
||||||
|
let scale_factor = 0.25;
|
||||||
|
let scale = Matrix3x3::new_2d_scaling(scale_factor, scale_factor);
|
||||||
|
let triangles = get_quad(mode, texture, blendmap, scale * Matrix3x3::new_2d_translation(60.0, 40.0), top_left, top_right, bottom_left, bottom_right);
|
||||||
|
dest.triangle_list_2d(&triangles);
|
||||||
|
|
||||||
|
let scale_factor = 0.3;
|
||||||
|
let scale = Matrix3x3::new_2d_scaling(scale_factor, scale_factor);
|
||||||
|
let triangles = get_quad(mode, texture, blendmap, scale * Matrix3x3::new_2d_translation(80.0, 40.0), top_left, top_right, bottom_left, bottom_right);
|
||||||
|
dest.triangle_list_2d(&triangles);
|
||||||
|
|
||||||
|
let scale_factor = 0.35;
|
||||||
|
let scale = Matrix3x3::new_2d_scaling(scale_factor, scale_factor);
|
||||||
|
let triangles = get_quad(mode, texture, blendmap, scale * Matrix3x3::new_2d_translation(100.0, 40.0), top_left, top_right, bottom_left, bottom_right);
|
||||||
|
dest.triangle_list_2d(&triangles);
|
||||||
|
|
||||||
|
let scale_factor = 0.5;
|
||||||
|
let scale = Matrix3x3::new_2d_scaling(scale_factor, scale_factor);
|
||||||
|
let triangles = get_quad(mode, texture, blendmap, scale * Matrix3x3::new_2d_translation(60.0, 60.0), top_left, top_right, bottom_left, bottom_right);
|
||||||
|
dest.triangle_list_2d(&triangles);
|
||||||
|
|
||||||
|
let scale_factor = 0.66;
|
||||||
|
let scale = Matrix3x3::new_2d_scaling(scale_factor, scale_factor);
|
||||||
|
let triangles = get_quad(mode, texture, blendmap, scale * Matrix3x3::new_2d_translation(90.0, 60.0), top_left, top_right, bottom_left, bottom_right);
|
||||||
|
dest.triangle_list_2d(&triangles);
|
||||||
|
|
||||||
|
// upscaled sizes with various rotations
|
||||||
// todo: my matrix math is wrong here somehow (was trying to do rotations around the center of each quad), but i
|
// todo: my matrix math is wrong here somehow (was trying to do rotations around the center of each quad), but i
|
||||||
// don't care enough to fix this properly. the output of this crap is "good enough"
|
// don't care enough to fix this properly. the output of this crap is "good enough"
|
||||||
let mut angle = 0.0;
|
let mut angle = 0.0;
|
||||||
|
|
|
@ -2648,6 +2648,33 @@ fn draw_triangles(dest: &mut RgbaBitmap, mode: TriangleType, texture: Option<&Rg
|
||||||
let triangles = get_quad(mode, texture, scale * Matrix3x3::new_2d_translation(220.0, 20.0), top_left, top_right, bottom_left, bottom_right);
|
let triangles = get_quad(mode, texture, scale * Matrix3x3::new_2d_translation(220.0, 20.0), top_left, top_right, bottom_left, bottom_right);
|
||||||
dest.triangle_list_2d(&triangles);
|
dest.triangle_list_2d(&triangles);
|
||||||
|
|
||||||
|
// other downscaled sizes
|
||||||
|
let scale_factor = 0.25;
|
||||||
|
let scale = Matrix3x3::new_2d_scaling(scale_factor, scale_factor);
|
||||||
|
let triangles = get_quad(mode, texture, scale * Matrix3x3::new_2d_translation(60.0, 40.0), top_left, top_right, bottom_left, bottom_right);
|
||||||
|
dest.triangle_list_2d(&triangles);
|
||||||
|
|
||||||
|
let scale_factor = 0.3;
|
||||||
|
let scale = Matrix3x3::new_2d_scaling(scale_factor, scale_factor);
|
||||||
|
let triangles = get_quad(mode, texture, scale * Matrix3x3::new_2d_translation(80.0, 40.0), top_left, top_right, bottom_left, bottom_right);
|
||||||
|
dest.triangle_list_2d(&triangles);
|
||||||
|
|
||||||
|
let scale_factor = 0.35;
|
||||||
|
let scale = Matrix3x3::new_2d_scaling(scale_factor, scale_factor);
|
||||||
|
let triangles = get_quad(mode, texture, scale * Matrix3x3::new_2d_translation(100.0, 40.0), top_left, top_right, bottom_left, bottom_right);
|
||||||
|
dest.triangle_list_2d(&triangles);
|
||||||
|
|
||||||
|
let scale_factor = 0.5;
|
||||||
|
let scale = Matrix3x3::new_2d_scaling(scale_factor, scale_factor);
|
||||||
|
let triangles = get_quad(mode, texture, scale * Matrix3x3::new_2d_translation(60.0, 60.0), top_left, top_right, bottom_left, bottom_right);
|
||||||
|
dest.triangle_list_2d(&triangles);
|
||||||
|
|
||||||
|
let scale_factor = 0.66;
|
||||||
|
let scale = Matrix3x3::new_2d_scaling(scale_factor, scale_factor);
|
||||||
|
let triangles = get_quad(mode, texture, scale * Matrix3x3::new_2d_translation(90.0, 60.0), top_left, top_right, bottom_left, bottom_right);
|
||||||
|
dest.triangle_list_2d(&triangles);
|
||||||
|
|
||||||
|
// upscaled sizes with various rotations
|
||||||
// todo: my matrix math is wrong here somehow (was trying to do rotations around the center of each quad), but i
|
// todo: my matrix math is wrong here somehow (was trying to do rotations around the center of each quad), but i
|
||||||
// don't care enough to fix this properly. the output of this crap is "good enough"
|
// don't care enough to fix this properly. the output of this crap is "good enough"
|
||||||
let mut angle = 0.0;
|
let mut angle = 0.0;
|
||||||
|
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.8 KiB |