Skip to content

Commit d41b5b8

Browse files
committed
Add Chapter 17 (BDA) text
1 parent bb6efbb commit d41b5b8

File tree

304 files changed

+3818426
-292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

304 files changed

+3818426
-292
lines changed

bookcontents/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ The book is structured in the following chapters:
1919
- [Chapter 14](chapter-14/chapter-14.md): Deferred rendering (I).
2020
- [Chapter 15](chapter-15/chapter-15.md): Deferred rendering (II).
2121
- [Chapter 16](chapter-16/chapter-16.md): Cascade shadows.
22-
- [Chapter 17](chapter-17/chapter-17.md): Animations.
22+
- [Chapter 17](chapter-17/chapter-17.md): Animations.
23+
- [Chapter 18](chapter-18/chapter-18.md): Buffer Device Address (BDA).

bookcontents/chapter-06/chapter-06.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ import org.vulkanb.eng.model.*;
369369
import java.nio.*;
370370
import java.util.*;
371371

372-
import static org.lwjgl.vulkan.VK10.*;
372+
import static org.lwjgl.vulkan.VK13.*;
373373

374374
public class ModelsCache {
375375

bookcontents/chapter-08/chapter-08.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ import org.vulkanb.eng.model.MaterialData;
10401040
import java.nio.ByteBuffer;
10411041
import java.util.List;
10421042

1043-
import static org.lwjgl.vulkan.VK10.*;
1043+
import static org.lwjgl.vulkan.VK13.*;
10441044

10451045
public class MaterialsCache {
10461046

bookcontents/chapter-11/chapter-11.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,6 @@ import org.vulkanb.eng.graph.vk.*;
367367
import java.nio.*;
368368
import java.util.Arrays;
369369

370-
import static org.lwjgl.vulkan.VK10.*;
371370
import static org.lwjgl.vulkan.VK13.*;
372371

373372
public class PostRender {
@@ -500,9 +499,7 @@ public class EmptyVtxBuffStruct {
500499

501500
public EmptyVtxBuffStruct() {
502501
vi = VkPipelineVertexInputStateCreateInfo.calloc();
503-
vi.sType$Default()
504-
.pVertexBindingDescriptions(null)
505-
.pVertexAttributeDescriptions(null);
502+
vi.sType$Default();
506503
}
507504

508505
public void cleanup() {

bookcontents/chapter-15/chapter-15.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ layout(location = 2) in vec3 inTangent;
431431
layout(location = 3) in vec3 inBitangent;
432432
layout(location = 4) in vec2 inTextCoords;
433433
434-
layout(location = 0) out vec3 outPos;
434+
layout(location = 0) out vec4 outPos;
435435
layout(location = 1) out vec3 outNormal;
436436
layout(location = 2) out vec3 outTangent;
437437
layout(location = 3) out vec3 outBitangent;
@@ -453,7 +453,7 @@ void main()
453453
vec4 worldPos = push_constants.modelMatrix * vec4(inPos, 1);
454454
gl_Position = projUniform.matrix * viewUniform.matrix * worldPos;
455455
mat3 mNormal = transpose(inverse(mat3(push_constants.modelMatrix)));
456-
outPos = worldPos.xyz;
456+
outPos = worldPos;
457457
outNormal = mNormal * normalize(inNormal);
458458
outTangent = mNormal * normalize(inTangent);
459459
outBitangent = mNormal * normalize(inBitangent);
@@ -471,7 +471,7 @@ The `scn_frg.glsl` fragment shader is defined like this:
471471
// Keep in sync manually with Java code
472472
const int MAX_TEXTURES = 100;
473473
474-
layout(location = 0) in vec3 inPos;
474+
layout(location = 0) in vec4 inPos;
475475
layout(location = 1) in vec3 inNormal;
476476
layout(location = 2) in vec3 inTangent;
477477
layout(location = 3) in vec3 inBitangent;
@@ -516,7 +516,7 @@ layout(push_constant) uniform pc {
516516
517517
void main()
518518
{
519-
outPos = vec4(inPos, 1.0);
519+
outPos = inPos;
520520
521521
Material material = matUniform.materials[push_constants.materialIdx];
522522
if (material.hasTexture == 1) {

bookcontents/chapter-17/chapter-17.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ import org.vulkanb.eng.scene.Entity;
813813
import java.util.*;
814814

815815
import static org.lwjgl.util.vma.Vma.*;
816-
import static org.lwjgl.vulkan.VK10.*;
816+
import static org.lwjgl.vulkan.VK13.*;
817817

818818
public class AnimationsCache {
819819

0 commit comments

Comments
 (0)