Turn the rendering question around
The ray renderer starts at a sample and searches the scene. A triangle rasterizer starts with a primitive and visits samples it might cover. Both ultimately assign values to an image, but they organize the work differently. This lesson begins with coordinates already on the screen so you can isolate coverage from camera mathematics.
The native raster lab uses x to the right and y downward, with samples at pixel centers. A triangle’s bounding box limits the search. Clamp that box to the validated viewport before indexing an image; offscreen geometry must not become a negative or oversized array index.
Run prism-raster to inspect the reference, then make a small triangle arrangement of your own. The existing composition is useful evidence that the reference runs. Your geometric postcard, tests, and explanation are the deliverable.
Run ./build/clang-debug/prism-raster triangles.ppm from native after building. Change one vertex or color and predict the changed region before opening your output.
