1
0
Fork 0
mirror of https://git.coom.tech/drummyfish/small3dlib.git synced 2024-12-22 01:26:17 +01:00

Add rasterization conventions

This commit is contained in:
Miloslav Číž 2019-05-03 20:52:40 +02:00
parent db06869dd7
commit e0aa1e6661

14
s3l.h
View file

@ -64,6 +64,20 @@
|
Coordinates of pixels on screen start typically at the top left, from [0,0].
Rasterization rules are to be the same as in OpenGL or DirectX:
- Pixel centers are at integer coordinates.
- Pixel is rasterized if its center is inside the primitive (e.g. a triangle)
OR
if its center is exactly on the primitive's side, which is either left
(no exactly horizontal and on the left side of triangle) or top (exactly
horizontal and above the other two edges)
These rules imply e.g.:
- Triangles of points that lie on a single line are not rasterized.
- A single "long" triangle can be rasterized as non-continuous.
*/
#ifndef S3L_H