Skip to content

Interactive Computer Graphics CS 5610/6610 with Rust and Metal

Notifications You must be signed in to change notification settings

peterwmwong/uou-interactive-graphics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

I'm learning computer graphics by watching the a l a r m i n g l y well produced recorded lectures by Cem Yuksel for University of Utah's Interactive Computer Graphics CS 5610/6610.

This repository contains my attempt to complete the projects associated with the course.

WARNING: Developed and tested ONLY on Metal 3 (MacOS Ventura Beta 4, Xcode 14 Beta 4, MacBook Pro M1 Max). Outside of this setup, I have no idea whether any of this code works.

  • Render something!

Project 1

  • Transform model vertex coordinates to to normalized device coordinates
  • Toggle between Orthographic and Perspective Projection

Project 2

  • Ambient, Diffuse, and Specular Shading

Project 3

  • Load and render model materials

Project 4 Teapot Project 4 Yoda

  • Render to a texture, then render that texture to a plane
  • Toggle between different texture sampling modes
    • Nearest
    • Bilinear
    • Trilinear
    • Anisotropic

Project 5 Checkerboard Project 5 Yoda

  • Render an environment (skybox) using a cube texture
  • Render model and plane with perfect, mirror-like material
  • Render model's reflection onto the plane

Project 6 Teapot

Alternate implementation of Project 6 using Ray Tracing.

  • Render model and plane using multi-bounce (4) ray tracing
    • Unlike original Project 6, the model reflects on itself!
  • Render laser pointer to visualize ray tracing

X-Project 6 Ray Traced Teapot

  • Render shadows of a model onto itself and a plane below it
  • Use a Shadow Map (Depth texture)

Project 7 Yoda

Alternate implementation of Project 7 using Ray Tracing.

  • Render shadows of a model onto itself and a plane below it
  • Use a Ray Tracing

X-Project 7 Yoda

  • Normal Mapping
  • Displacement Mapping with Tesselation Shaders

Project 8

X-RT Yoda

Implementation

Hold on to your butts....

I'm trying to learn new stuff on top of new stuff.

Common Project Architecture

TODO: Document metal-types/metal-build crates and how data structures are shared between Metal and Rust

TODO: Document how metal-build provides build.rs support for each project to precompile shaders

TODO: Document metal-app, especially RenderPipeline and Binds for simplifying and removing/reducing errors when setting up simple to complex (ex. depth/stencil, multiple sub-passes, many binds) render pipelines.

Performance

See performance.md for more in-depth documentation on workflows and tooling for assessing performance.

About

Interactive Computer Graphics CS 5610/6610 with Rust and Metal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published