#pragma once #include "prism/renderer.hpp" #include namespace prism { // Already projected screen coordinates: +X right, +Y down. Depth 0 is near, // depth 1 is far. This reference starts AFTER a camera's projection/clipping. struct ScreenVertex { double x{}, y{}, depth{}; Color color; }; struct Triangle { std::array vertices; }; struct RasterScene { std::uint32_t width{}, height{}; Color background; std::vector triangles; }; inline constexpr std::size_t max_triangles = 64; inline constexpr std::size_t max_raster_work = 16'777'216; inline constexpr double max_screen_coordinate = 8192; [[nodiscard]] RasterScene demo_raster_scene(); [[nodiscard]] std::expected validate_raster_scene(const RasterScene& scene); [[nodiscard]] std::expected rasterize(const RasterScene& scene); } // namespace prism