Skip to content

Latest commit

 

History

History
103 lines (63 loc) · 4.55 KB

README.md

File metadata and controls

103 lines (63 loc) · 4.55 KB

Swift x Metal for 3D Graphics Rendering

This repository contains the project I created whist using Swift (with SwiftUI) and Metal to create simple 3D graphics on Apple platforms. It's part of an ongoing article series in which I explore the fundamentals needed to create a 3D Rendering Pipeline in Swift.

Author’s Note: If I've made any errors, or you have a really cool way of implementing something, feel free to open an issue or leave a comment!


Table of Contents

  1. Articles in This Series
  2. Useful Resources
  3. Setup & Requirements
  4. Feedback & Contributions
  5. License
  6. Beautiful Pictures (Development Screenshots)

Articles in This Series

Below are links to articles detailing each phase of the development process:

Bonus Article: Running Modern OpenGL on macOS: A Virtualized Ubuntu Approach

  1. Swift x Metal for 3D Graphics Rendering Part 1: Setting Up in SwiftUI
  2. Swift x Metal for 3D Graphics Rendering Part 2: Metal Shaders and Drawing A Triangle
  3. Swift x Metal for 3D Graphics Rendering Part 3: Vertex and Index Buffers
  4. Swift x Metal for 3D Graphics Rendering Part 4: Drawing 3D Shapes And The Matrix
  5. Swift x Metal for 3D Graphics Rendering Part 5: Drawing 3D Models From Files
  6. Coming One of These Days: Part 6 and More

Check back periodically or watch this repo to see when new articles are added!


Useful Resources


Setup & Requirements

Requirements

  • Xcode

  • iOS or macOS Catalyst deployment target (my code assumes macOS Catalyst, but it can be adapted).

  • Swift 5.7 or later.

    Set Up

  • Clone the repository

  • Open project in XCode

  • Change the Development Team

  • Clean your build folder

  • Build and run the app


Feedback & Contributions

  • Found a bug or have a suggestion? Open an issue or submit a pull request.
  • Have a unique approach or optimization? Feel free to share by opening a PR or starting a discussion.
  • Curious about a specific topic in Metal? Let me know, and I might write a dedicated article about it!

License

This project is available under the MIT License. Feel free to use, modify, and distribute this code for your own projects.

Beautiful Pictures (Development Screenshots)

Current State of Repo

Screen.Recording.2025-01-27.at.3.00.33.PM.mov

By The End of Part 5

Screenshot 2025-01-27 at 2 07 35 PM

By The End of Part 4

Screenshot 2025-01-12 at 4 42 51 PM

By The End of Part 3

Screenshot 2025-01-12 at 4 46 01 PM

By The End of Part 2

1*bzEy0H7xysrc2Nuw8kyfhQ

By The End of Part 1

Screenshot 2025-01-07 at 3 14 32 PM