Metal by Tutorials (Fourth Edition): Beginning Game Engine Development With Metal
β Scribed by Kodeco Team, Caroline Begbie, Marius Horga
- Publisher
- Kodeco Inc.
- Year
- 2023
- Tongue
- English
- Leaves
- 806
- Edition
- 4
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Build your own low-level game engine in Metal!
This book introduces you to graphics programming in Metal β Appleβs framework for programming on the GPU. Youβll build your own game engine in Metal where you can create 3D scenes and build your own 3D games.
Who This Book Is ForThis book is for intermediate Swift developers interested in learning 3D graphics or gaining a deeper understanding of how game engines work.
Topics Covered in Metal by Tutorials- The Rendering Pipeline: Take a deep dive through the graphics pipeline.
- 3D Models: Import 3D models with Model I/O and discover what makes up a 3D model.
- Coordinate Spaces: Learn the math behind 3D rendering.
- Lighting: Make your models look more realistic with simple lighting techniques.
- Shading: Understand how vertex and fragment shaders work.
- Textures & Materials: Design textures and surfaces for micro detail.
- Multipass Rendering: Add shadows with advanced lighting effects.
- Tile-based Deferred Rendering: Take full advantage of your Apple GPU with this rendering technique.
- GPU-Driven Rendering: Move the rendering setup to the GPU.
- Tessellation: Discover how to use tessellation to add a higher level of detail using fewer resources.
- Environment: Add realistic skies and water to your scenes.
- Particle Systems: Learn how to make stunning visual effects using GPU compute shaders.
- Character Animation: Bring your 3D models to life with joints and animation.
- Raytracing: Learn how to perform raytracing on the GPU.
- Advanced Lighting & Shadows: Discover signed distance fields and render beautiful shadows.
- Performance Optimization: Tune up your game with Xcodeβs new tools.
After reading this book, youβll be prepared to take full advantage of graphics rendering with the Metal framework.
β¦ Table of Contents
Book License
What You Need
Book Source Code & Forums
About the Authors
About the Editors
Acknowledgments
Introduction
About This Book
How Did Metal Come to Life?
Why Would You Use Metal?
When Should You Use Metal?
Who This Book Is For?
How to Read This Book?
Chapter 1: Hello, Metal!
What is Rendering?
What is a Frame?
Your First Metal App
The Metal View
Rendering
Challenge
Key Points
Chapter 2: 3D Models
What Are 3D Models?
Creating Models With Blender
3D File Formats
Exporting to Blender
The USD File Format
Materials
Material Groups
Vertex Descriptors
Metal Coordinate System
Submeshes
Challenge
Key Points
Chapter 3: The Rendering Pipeline
The GPU and CPU
The Metal Project
The Render Pipeline
Challenge
Key Points
Chapter 4: The Vertex Function
Shader Functions
The Starter Project
Rendering a Quad
Calculating Positions
More Efficient Rendering
Vertex Descriptors
Adding Another Vertex Attribute
Rendering Points
Challenge
Key Points
Chapter 5: 3D Transformations
Transformations
The Starter Project & Setup
Translation
Vectors & Matrices
Creating a Matrix
Scaling
Rotation
Key Points
Chapter 6: Coordinate Spaces
The Starter Project
Uniforms
Projection
Refactoring the Model Matrix
Key Points
Where to Go From Here?
Chapter 7: The Fragment Function
The Starter Project
Screen Space
Metal Standard Library Functions
Normals
Loading the Train Model With Normals
Depth
Hemispheric Lighting
Challenge
Key Points
Where to Go From Here?
Chapter 8: Textures
Textures and UV Maps
The Starter App
The Ground Plane
The Asset Catalog
sRGB Color Space
Capture GPU Workload
Samplers
Mipmaps
Challenge
Key Points
Chapter 9: Navigating a 3D Scene
The Starter Project
Scenes
Cameras
Input
Delta Time
Mouse and Trackpad Input
Arcball Camera
Orthographic Projection
Challenge
Key Points
Chapter 10: Lighting Fundamentals
The Starter Project
Representing Color
Normals
Light Types
Directional Light
The Phong Reflection Model
The Dot Product
Creating Shared Functions in C++
Point Lights
Spotlights
Key Points
Where to Go From Here?
Chapter 11: Maps & Materials
Physically Based Rendering (PBR)
The Starter App
Examining USD Files in Reality Composer Pro
Materials
Surface Roughness
Normal Maps
Using Normal Maps
Challenge
Where to Go From Here?
Chapter 12: Render Passes
Render Passes
Object Picking
The Starter App
Setting up Render Passes
Creating a UInt32 Texture
Adding the Render Pass to Renderer
Adding the Shader Function
Adding the Depth Attachment
Load & Store Actions
Reading the Object ID Texture
Key Points
Chapter 13: Shadows
Shadow Maps
The Starter Project
Identifying Problems
Visualizing the Problems
Solving the Problems
Cascaded Shadow Mapping
Key Points
Chapter 14: Deferred Rendering
The Starter Project
The G-buffer Pass
Updating Renderer
The Lighting Shader Functions
Adding Point Lights
Blending
Key Points
Chapter 15: Tile-Based Deferred Rendering
Programmable Blending
Tiled Deferred Rendering
The Starter Project
Stencil Tests
Create the Stencil Texture
Configure the Stencil Operation
Masking the Sky
Challenge
Key Points
Where to Go From Here?
Chapter 16: GPU Compute Programming
The Starter Project
Winding Order and Culling
Reversing the Model on the CPU
Compute Processing
Reversing the Gnome Using GPU Compute Processing
The Kernel Function
Atomic Functions
Key Points
Chapter 17: Particle Systems
Particle
Emitter
The Starter Project
Creating a Particle and Emitter
The Fireworks Pass
Particle Dynamics
Implementing Particle Physics
Particle Systems
Rendering a Particle System
Configuring Particle Effects
Fire
Key Points
Where to Go From Here?
Chapter 18: Particle Behavior
Behavioral Animation
Swarming Behavior
The Starter Project
Velocity
Behavioral Rules
Key Points
Where to Go From Here?
Chapter 19: Tessellation & Terrains
Tessellation
The Starter Project
The Tessellation Kernel
Multiple Patches
Tessellation By Distance
Displacement
Shading By Slope
Challenge
Key Points
Where to Go From Here?
Chapter 20: Fragment Post-Processing
The Starter App
Alpha Testing
Depth Testing
Stencil Testing
Scissor Testing
Alpha Blending
Opacity
Blending
Antialiasing
Fog
Key Points
Where to Go From Here?
Chapter 21: Image-Based Lighting
The Starter Project
The Skybox
Procedural Skies
Reflection
Image-Based Lighting
Challenge
Key Points
Where to Go From Here?
Chapter 22: Reflection & Refraction
The Starter Project
Rendering Rippling Water
1. Creating the Water Surface
2. Rendering the Reflection
3. Creating Clipping Planes
4. Rippling Normal Maps
5. Adding Refraction
6. The Fresnel Effect
7. Adding Smoothness Using a Depth Texture
Key Points
Where to Go From Here?
Chapter 23: Animation
The Starter Project
Animation
Procedural Animation
Animation Using Physics
Keyframes
Quaternions
USD and USDZ Files
Animating Meshes
Key Points
Chapter 24: Character Animation
Skeletal Animation
The Starter App
Implementing Skeletal Animation
Initializing Data
The Math of Striking a Pose
Joints and Weights Vertex Data
Transfer the Data to the GPU
Updating the Vertex Shader
Function Specialization
Key Points
Where to Go From Here?
Chapter 25: Managing Resources
The Starter Project
Argument Buffers
Resource Heaps
Key Points
Chapter 26: GPU-Driven Rendering
The Starter Project
Indirect Command Buffers
GPU-Driven Rendering
Challenge
Key Points
Where to Go From Here?
Chapter 27: Rendering With Rays
Getting Started
Ray Casting
Ray Tracing
Path Tracing
Raymarching
Signed Distance Functions
The Starter App
Using a Signed Distance Function
The Raymarching Algorithm
Creating Random Noise
Marching Clouds
Key Points
Chapter 28: Advanced Shadows
Hard Shadows
The Starter App
Soft Shadows
Ambient Occlusion
Key Points
Where to Go From Here?
Chapter 29: Advanced Lighting
The Rendering Equation
Reflection
Getting Started
Refraction
Raytraced Water
Key Points
Where to Go From Here?
Chapter 30: Metal Performance Shaders
Overview
The Sobel Filter
Image Processing
The Starter Project
The Blit Command Encoder
Gaussian Blur
Matrix / Vector Mathematics
Challenge
Key Points
Chapter 31: Performance Optimization
The Starter App
Profiling
GPU Workload Capture
GPU Timeline
Instancing
Removing Duplicate Textures
CPU-GPU Synchronization
Key Points
Chapter 32: Best Practices
General Performance Best Practices
Memory Bandwidth Best Practices
Memory Footprint Best Practices
Where to Go From Here?
Conclusion
π SIMILAR VOLUMES
<p><strong>Build your own low-level game engine in Metal!</strong></p><p>This book introduces you to graphics programming in Metal β Appleβs framework for programming on the GPU. Youβll build your own game engine in Metal where you can create 3D scenes and build your own 3D games.</p><p><strong>Who
<p><strong>Build your own low-level game engine in Metal!</strong></p><p>This book introduces you to graphics programming in Metal β Appleβs framework for programming on the GPU. Youβll build your own game engine in Metal where you can create 3D scenes and build your own 3D games.</p><p><strong>Who
<p><strong>Build your own low-level game engine in Metal!</strong></p><p>This book introduces you to graphics programming in Metal β Appleβs framework for programming on the GPU. Youβll build your own game engine in Metal where you can create 3D scenes and build your own 3D games.</p><p><strong>Who
Razeware LLC, 2016. β 380 p. β ISBN: 978-1942878162.<br/> <br/><strong>Code file uploaded <a class="object-link fpm" data-file-id="1937470" href="/file/1937470/">here</a></strong><div class="bb-sep"></div><strong>Learn How to Make 3D iOS Games! Learn how to make 3D games in Swift, using Appleβs buil