| ▲ | Implementing a tiny CPU rasterizer (2024)(lisyarus.github.io) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 points by PaulHoule 5 days ago | 18 comments | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | delta_p_delta_x 8 hours ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This is a great resource. Some others along the same lines: TinyRenderer: https://haqr.eu/tinyrenderer/ ScratchAPixel: https://www.scratchapixel.com/index.html 3D Computer Graphics Programming by Pikuma (paid): https://pikuma.com/courses/learn-3d-computer-graphics-progra... Ray-tracing: Ray Tracing in One Weekend: https://raytracing.github.io/ Ray Tracing Gems: https://www.realtimerendering.com/raytracinggems/ Physically Based Rendering, 4th Edition: https://pbr-book.org/ Both: Computer Graphics from Scratch: https://gabrielgambetta.com/computer-graphics-from-scratch/ I'll also link a comment[1] I made a while back about learning 3D graphics. There's no better teacher than manually implementing the rasterisation and ray-tracing pipelines. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | Sohcahtoa82 3 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I tried doing this in Python a bit ago. It did not go well and it really showed how SLOW Python really is. Even with just an 1280x720 window, setting every pixel to a single color by setting a value in a byte array and then using a PyGame function to just give it a full frame to draw, I maxed out at like 10 fps. I tried so many things and simply could not get any faster. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | feelamee 7 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> Triangles are easy to rasterize sure, rasterizing triangle is not so hard, but.. you know, rasterizing rectangle is far far easier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | nottorp 4 hours ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
With the discrete GPUs pricing themselves out of the consumer space, we may actually need to switch back to software rendering :) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||