Sprite Batch Rendering Test

This test simulates exactly how sprite_batch.rs renders sprites with UV coordinates.

Test Texture (2x2 spritesheet)

┌─────────┬─────────┐
│ RED (0) │ GREEN(1)│  v: 0.0 - 0.5
├─────────┼─────────┤
│ BLUE(2) │ YELLOW(3)│  v: 0.5 - 1.0
└─────────┴─────────┘
    

Rendering Test (same as sprite_batch.rs)

Main rendering canvas

sprite_batch.rs vertex mapping:

corners = [
  (-ox, height-oy),  // 0: Top-left (high Y)
  (width-ox, height-oy), // 1: Top-right
  (width-ox, -oy),   // 2: Bottom-right (low Y)
  (-ox, -oy),        // 3: Bottom-left
];

tex_coords = [
  [u0, v0], // 0: Top-left
  [u1, v0], // 1: Top-right
  [u1, v1], // 2: Bottom-right
  [u0, v1], // 3: Bottom-left
];

indices = [0, 1, 2, 2, 3, 0];
            

Frame-by-Frame Test Results

Conclusion