Learning C, Day 14 (Perspective Matrix)

Today I spent about two and a half hours implementing the perspective matrix and better flat shading. Now the renderer supports different aspect ratios and fields of view:

At one point I messed up the color shading code and this happened (warning, flashing colors):

Also, the site now has an icon and dark mode! I would’ve added the icon sooner, but my theme (Twenty Twenty One) doesn’t support the icon next to the site title. An hour of cobbling together CSS, and it does! Dark mode was easy: my theme supports it by default, so I just enabled it. Although, I don’t like the toggle mode button placement, I’ll probably figure out how to change it eventually. Anyway, I think the site looks a lot better with the icon. Let me know what you think!

Leave a comment

Your email address will not be published. Required fields are marked *

Your data is processed in accordance with my privacy policy. Comments are manually approved and may take a while to appear.