A program that emulates the 3d rendering process from scratch in the CPU with C++ maded for fun
It uses assimp to import some 3d objects files with materials
Check some results
- Perspective projection (world, camera and screen space ...)
- Naive triangle "clipping"
- Camera implementation with translation (with front, right and up vectors) and rotation (based on pitch and yaw)
- Basic triangle scan line using triangle bounding box
- Triangle interpolation for vertex attributes with z correction
- Per pixel light, uv mapping with textures, wireframe, depth testing and more
- Everything is writed in an array of pixels (Pixel buffer) and sended to GPU to draw as a simple texture
- GPU is not used at all (only to show the result)
- Face culling based on camera front vector (recent)
- Change framebuffer resolution
- Draw mode (wireframe, light, normals, positions, uvs, patterns, depth)
- Camera movement and rotation speed
- Fov, Aspect Ratio
- Pattern scalar
- ZFar and ZNear planes
- Here is some print of the results with the best angle
- A better triangle drawing algorithm, to get more peformance
- Triangle clipping is done perfectly only on Z axis, maybe if done in all axis will increase performance