You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/05_Uniform_buffers/00_Descriptor_set_layout_and_buffer.adoc
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,11 +12,11 @@ A descriptor is a way for shaders to freely access resources like buffers and im
12
12
We're going to set up a buffer that contains the transformation matrices and have the vertex shader access them through a descriptor.
13
13
Usage of descriptors consists of three parts:
14
14
15
-
* Specify a descriptor layout during pipeline creation
15
+
* Specify a descriptor set layout during pipeline creation
16
16
* Allocate a descriptor set from a descriptor pool
17
17
* Bind the descriptor set during rendering
18
18
19
-
The _descriptor layout_ specifies the types of resources that are going to be accessed by the pipeline, just like a render pass specifies the types of attachments that will be accessed.
19
+
The _descriptor set layout_ specifies the types of resources that are going to be accessed by the pipeline, just like a render pass specifies the types of attachments that will be accessed.
20
20
A _descriptor set_ specifies the actual buffer or image resources that will be bound to the descriptors, just like a framebuffer specifies the actual image views to bind to render pass attachments.
21
21
The descriptor set is then bound for the drawing commands just like the vertex buffers and framebuffer.
22
22
@@ -80,7 +80,7 @@ void main() {
80
80
81
81
Note that the order of the `uniform`, `in` and `out` declarations doesn't matter.
82
82
The `binding` directive is similar to the `location` directive for attributes.
83
-
We're going to reference this binding in the descriptor layout.
83
+
We're going to reference this binding in the descriptor set layout.
84
84
The line with `gl_Position` is changed to use the transformations to compute the final position in clip coordinates.
85
85
Unlike the 2D triangles, the last component of the clip coordinates may not be `1`, which will result in a division when converted to the final normalized device coordinates on the screen.
86
86
This is used in perspective projection as the _perspective division_ and is essential for making closer objects look larger than objects that are further away.
You may be wondering why it's possible to specify multiple descriptor set layouts here, because a single one already includes all of the bindings.
195
195
We'll get back to that in the next chapter, where we'll look into descriptor pools and descriptor sets.
196
196
197
-
The descriptor layout should stick around while we may create new graphics pipelines i.e.
197
+
The descriptor set layout should stick around while we may create new graphics pipelines i.e.
198
198
until the program ends:
199
199
200
200
[,c++]
@@ -392,4 +392,4 @@ We may look at these in a future chapter.
392
392
393
393
In the next chapter we'll look at descriptor sets, which will actually bind the ``VkBuffer``s to the uniform buffer descriptors so that the shader can access this transformation data.
Copy file name to clipboardExpand all lines: en/06_Texture_mapping/02_Combined_image_sampler.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ We looked at descriptors for the first time in the uniform buffers part of the t
6
6
In this chapter we will look at a new type of descriptor: _combined image sampler_.
7
7
This descriptor makes it possible for shaders to access an image resource through a sampler object like the one we created in the previous chapter.
8
8
9
-
We'll start by modifying the descriptor layout, descriptor pool and descriptor set to include such a combined image sampler descriptor.
9
+
We'll start by modifying the descriptor set layout, descriptor pool and descriptor set to include such a combined image sampler descriptor.
10
10
After that, we're going to add texture coordinates to `Vertex` and modify the fragment shader to read colors from the texture instead of just interpolating the vertex colors.
0 commit comments