Compare commits
2 Commits
b24fbabc4a
...
4d464d8b4c
| Author | SHA1 | Date |
|---|---|---|
|
|
4d464d8b4c | |
|
|
55438ce984 |
|
|
@ -0,0 +1,25 @@
|
|||
# Chapter 9:
|
||||
|
||||
As I read this book, I summarize what I think is wrong. If you think my comments are wrong then please let me know. We can dicuss more and update your opinion.
|
||||
|
||||
## The runtime error
|
||||
|
||||
A metal shader file isn't included in the bundle so we can't read shader so the runtime error is happened. But a metal shader is compiled and saved as the default library. Replace code in `buildPipelineState()`:
|
||||
|
||||
```
|
||||
guard let path = Bundle.main.path(forResource: "Shaders", ofType: "metal") else { return }
|
||||
let source = try String(contentsOfFile: path, encoding: .utf8)
|
||||
let library = try device.makeLibrary(source: source, options: nil)
|
||||
```
|
||||
|
||||
to this code:
|
||||
|
||||
```
|
||||
guard let library = device.makeDefaultLibrary() else {
|
||||
fatalError("Can't make default library")
|
||||
}
|
||||
```
|
||||
|
||||
## Antialiasing
|
||||
|
||||
This book says that MSAA(Multisample Antialiasing) is more expeensive to compute. But it's not true in modern GPUs. Nowadays most of GPUs supports 4X MSAA almost free so don't worry about using MSAA.
|
||||
17
README.md
17
README.md
|
|
@ -16,14 +16,15 @@ You can see color images in this book at [here](https://www.raywenderlich.com/bo
|
|||
|
||||
## Summarize
|
||||
|
||||
* [Chapter 1: Hello, Metal!](https://github.com/daemyung/MetalByTutorials/tree/main/01-introduction-to-metal)
|
||||
* [Chapter 2: 3D Models](https://github.com/daemyung/MetalByTutorials/tree/main/02-3d-models)
|
||||
* [Chapter 3: The Rendering Pipeline](https://github.com/daemyung/MetalByTutorials/tree/main/03-rendering-pipeline)
|
||||
* [Chapter 4: Coordinate Spaces](https://github.com/daemyung/MetalByTutorials/tree/main/04-3d-transforms)
|
||||
* [Chapter 5: Lighting Fundamentals](https://github.com/daemyung/MetalByTutorials/tree/main/05-lighting-fundamentals)
|
||||
* [Chapter 6: Textures](https://github.com/daemyung/MetalByTutorials/tree/main/06-textures)
|
||||
* [Chapter 8: Character Animation](https://github.com/daemyung/MetalByTutorials/tree/main/08-character-animation)
|
||||
* [Chapter 9: The Scene Graph](https://github.com/daemyung/MetalByTutorials/tree/main/09-scene-graph)
|
||||
* [Chapter 1: Hello, Metal!](https://github.com/daemyung/metal-by-tutorials/tree/main/01-introduction-to-metal)
|
||||
* [Chapter 2: 3D Models](https://github.com/daemyung/metal-by-tutorials/tree/main/02-3d-models)
|
||||
* [Chapter 3: The Rendering Pipeline](https://github.com/daemyung/metal-by-tutorials/tree/main/03-rendering-pipeline)
|
||||
* [Chapter 4: Coordinate Spaces](https://github.com/daemyung/metal-by-tutorials/tree/main/04-3d-transforms)
|
||||
* [Chapter 5: Lighting Fundamentals](https://github.com/daemyung/metal-by-tutorials/tree/main/05-lighting-fundamentals)
|
||||
* [Chapter 6: Textures](https://github.com/daemyung/metal-by-tutorials/tree/main/06-textures)
|
||||
* [Chapter 8: Character Animation](https://github.com/daemyung/metal-by-tutorials/tree/main/08-character-animation)
|
||||
* [Chapter 9: The Scene Graph](https://github.com/daemyung/metal-by-tutorials/tree/main/09-scene-graph)
|
||||
* [Chapter 10: Fragment Post-Processing](https://github.com/daemyung/metal-by-tutorials/tree/main/10-trees-and-fog)
|
||||
|
||||
## Copyright
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue