Ask HN: How to self-learn graphics programming?

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • tinyrenderer

    A brief computer graphics / rendering course

  • Linear algebra is really important for graphics programming, but there's really only a handful of concepts you need to get started (vectors, matrix operations (rotation, translation, scale)). This course is relatively short and should give you a good background on these topics: https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2x... . For me, I learned more from the course than my college level linear algebra class.

    Other important things to learn are what Vector and Fragment shaders are. I think this course is a good intro for it: https://github.com/ssloy/tinyrenderer

    Lastly, when you are ready to start writing real graphics code, you might want to consider using something like Metal if you are on macOS. I have found it to have a much better API than OpenGL. Here's a good book on the topic: https://gumroad.com/l/metalbyexample . I haven't used DirectX, but I imagine its probably much better than OpenGL too.

    If you do want to use OpenGL, I found these to be good resources: https://open.gl and http://learnopengl.com/

  • gfx

    [maintenance mode] A low-overhead Vulkan-like GPU API for Rust.

  • https://crates.io/crates/tiny-skia

    You can put things together pretty easily with these libs. And they also let you skip the gpu boilerplate (I should note that tiny-skia works only in the CPU).

    Lastly, you have shader programming (OpenGL, Vulkan, etc.). If you're writing "production code" you'll have to do some setting up of the GPU, and the actual graphics code will be in a separate shader language. Shader languages are similar to C but with restrictions that allow for a high level of parallism, making it extremely fast. If you want to get started with this I'd recommend playing around on a site like shadertoy[1] where you can start writing shaders right away. I haven't done much of this myself but as far as Rust goes I've seen a lot of references to the gfx crate:

    https://crates.io/crates/gfx

    I hope this helps

    [1] https://www.shadertoy.com/

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts