# Rendering

## # Projective Rendering

- For each triangle of the object/mesh
- Project its vertices onto the screen
- For each pixel in the triangle on the screen
- Compute the colour

Utilizes parallelism to take advantage of SIMD (GPUs are fast at this!)

- Vertex shader: run for every vertex to transform it to normalized screen space
- Fragment Shader: run for every pixel to compute the pixel colour

## # Raytracing

- For each pixel in the image
- Generate a ray
- For each triangle
- Test intersection of triangle and ray

- Compute colour based on closest object

## # Coordinate Systems

Which way is up?

- Y is up
- Z is up

Can also either be (imagine both of the following where X is thumb, Y is pointer, Z is middle)

- Left-handed
- Right-handed