Skip to content

Regarding book errata  #4

@mmmovania

Description

@mmmovania

Thanks for this amazing book. Is there an errata page somewhere that lists some issues with the book text. I have noticed a couple of issues in it so whats the best way to share those with the author?

To give you some examples:

Issue 1
On page 11, the book shares a code snippet. " The following code shows how an application can access information about the user’s GPU adapter and display it in the console.

 // Access information about the GPU adapter
 const info = await adapter.requestAdapterInfo();
 if(info) {
    console.log("Vendor: " + info.vendor);
    console.log("Architecture: " + info.architecture);
    console.log("Device: " + info.device);
    console.log("Description: " + info.description);
 }

"
This code doesnot work on MSEdge. The Mozilla page says the function (requestAdapterInfo) is deprecated
https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapter/requestAdapterInfo

issue 2
On page 34, third paragraph, the book says,
"For example, if this is set to 100, the renderer will start assembling shapes with the hundredth vertex in the buffer."
Since indices start at 0, the value set to 100 would mean you are starting from the 101th vertex isnt it?

issue 3
On page 42, fourth paragraph, the book says,
"The arrayStride, format, and offset properties can be confusing, so Figure 3.4 illustrates how they relate to the triangle’s attributes. Each gray rectangle corresponds to a 4-byte float, and each row of rectangles represents a vertex’s attribute.
Keep in mind that arrayStride and offset are given in bytes."
But I dont see any grey rectangle in Figure 3.4

Issue 4
On page 59, second paragraph after code snippet, book says
"This function is an entry point for a vertex shader because its name is preceded by @vertex. It accepts two parameters (a vec2f and a vec3f)"
The orangetriangle vertex shader accepts a single vec2f

fn vertexMain(@location(0) coords: vec2f) -> @builtin(position) vec4f {
    return vec4f(coords, 0.0, 1.0);
}

Issue 5
On page 74 first pargraph, book says,
"... the index of the current vertex, accessed with @Builtin(index)" this should be @Builtin(vertex_index)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions