Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 18f0f8c

Browse files
committed
Clarify wording of descriptorCount explanation
1 parent 48b432b commit 18f0f8c

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

05_Uniform_buffers/00_Descriptor_layout_and_buffer.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,12 @@ void createDescriptorSetLayout() {
146146
```
147147

148148
The first two fields specify the `binding` used in the shader and the type of
149-
descriptor, which is a uniform buffer. It is possible for a uniform buffer
150-
descriptor to be an array of data, and `descriptorCount` specifies the number of
151-
values in the array. This could be used to specify a transformation for each of
152-
the bones in a skeleton for skeletal animation, for example. Our MVP
153-
transformation is a single object, so we're using a `descriptorCount` of `1`.
149+
descriptor, which is a uniform buffer object. It is possible for the shader
150+
variable to represent an array of uniform buffer objects, and `descriptorCount`
151+
specifies the number of values in the array. This could be used to specify a
152+
transformation for each of the bones in a skeleton for skeletal animation, for
153+
example. Our MVP transformation is in a single uniform buffer object, so we're
154+
using a `descriptorCount` of `1`.
154155

155156
```c++
156157
uboLayoutBinding.stageFlags = VK_SHADER_STAGE_VERTEX_BIT;
@@ -380,4 +381,4 @@ transformation data.
380381
381382
[C++ code](/code/descriptor_layout.cpp) /
382383
[Vertex shader](/code/shader_ubo.vert) /
383-
[Fragment shader](/code/shader_ubo.frag)
384+
[Fragment shader](/code/shader_ubo.frag)

0 commit comments

Comments
 (0)