Book Content Comments

I think this book is great. Since I’m reading the early access version I’d like to make a few comments about the content in hopes of improving the final book. These are from version 0.2 of the book.

On page 16: The Oxford Dictionary definition is not helpful. I suggest just dropping it.

On page 19: The source code initializes the MTKView, passing the initializer a frame and a device. Two lines later it assigns the device to the MTKView’s .device property. This assignment is redundant.

On page 29: Is “• A triangle has the least number of points that can be drawn in two dimensions.” true? A line has less points, and can be drawn in two dimensions. Maybe you meant that triangles are the polygons with the least number of points.

1 Like

@mr_berna, thanks for the great feedback. We will make the appropriate changes.

I ran into a problem following the procedure in Chapter 3 page 50 to setup the Mac app. When I reached the point of changing the type of the main view Interface Builder didn’t yet know about MTKViews. I suggest adding a step to the instructions before this step: add the MetalKit framework as a linked framework. Then Interface Builder knows about MTKViews, and that class shows up in the menu of known alternative view classes.

1 Like

while I agree that it does not yet “know” about MTKView, it will still compile, provided that the MetalKit framework was imported in the renderer class. thanks for the great feedback again!

On page 131 of v0.3 of the PDF is the line of code:

float spotResult = (dot(lightDirection, coneDirection));

What are the extra parentheses for?

P.S. I’m really enjoying the book so far. Thanks for writing it.

1 Like

@mr_berna you can really ignore the extra pair of parentheses. I think it’s a leftover from a longer formula we used before. We’ll get rid of them in the next update.