Skip to content

Commit 8759dbc

Browse files
authored
Update 01_Image_view_and_sampler.adoc
Removed some fields which appear early but are introduced only later in the text.
1 parent bc193f7 commit 8759dbc

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

en/06_Texture_mapping/01_Image_view_and_sampler.adoc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ The choices are `VK_FILTER_NEAREST` and `VK_FILTER_LINEAR`, corresponding to the
144144

145145
[,c++]
146146
----
147-
vk::SamplerCreateInfo samplerInfo{.magFilter = vk::Filter::eLinear, .minFilter = vk::Filter::eLinear, .mipmapMode = vk::SamplerMipmapMode::eLinear,
148-
.addressModeU = vk::SamplerAddressMode::eRepeat, .addressModeV = vk::SamplerAddressMode::eRepeat };
147+
vk::SamplerCreateInfo samplerInfo{.magFilter = vk::Filter::eLinear, .minFilter = vk::Filter::eLinear,
148+
.addressModeU = vk::SamplerAddressMode::eRepeat, .addressModeV = vk::SamplerAddressMode::eRepeat, .addressModeW = vk::SamplerAddressMode::eRepeat};
149149
----
150150

151151
The addressing mode can be specified per axis using the `addressMode` fields.
@@ -166,7 +166,7 @@ However, the repeat mode is probably the most common mode, because it can be use
166166
[,c++]
167167
----
168168
vk::PhysicalDeviceProperties properties = physicalDevice.getProperties();
169-
vk::SamplerCreateInfo samplerInfo{.magFilter = vk::Filter::eLinear, .minFilter = vk::Filter::eLinear, .mipmapMode = vk::SamplerMipmapMode::eLinear,
169+
vk::SamplerCreateInfo samplerInfo{.magFilter = vk::Filter::eLinear, .minFilter = vk::Filter::eLinear,
170170
.addressModeU = vk::SamplerAddressMode::eRepeat, .addressModeV = vk::SamplerAddressMode::eRepeat, .addressModeW = vk::SamplerAddressMode::eRepeat,
171171
.anisotropyEnable = vk::True, .maxAnisotropy = properties.limits.maxSamplerAnisotropy};
172172
----
@@ -189,10 +189,9 @@ If we want to go for maximum quality, we can simply use that value directly:
189189
[,c++]
190190
----
191191
vk::PhysicalDeviceProperties properties = physicalDevice.getProperties();
192-
vk::SamplerCreateInfo samplerInfo{.magFilter = vk::Filter::eLinear, .minFilter = vk::Filter::eLinear, .mipmapMode = vk::SamplerMipmapMode::eLinear,
192+
vk::SamplerCreateInfo samplerInfo{.magFilter = vk::Filter::eLinear, .minFilter = vk::Filter::eLinear,
193193
.addressModeU = vk::SamplerAddressMode::eRepeat, .addressModeV = vk::SamplerAddressMode::eRepeat, .addressModeW = vk::SamplerAddressMode::eRepeat,
194-
.anisotropyEnable = vk::True, .maxAnisotropy = properties.limits.maxSamplerAnisotropy,
195-
.compareEnable = vk::False, .compareOp = vk::CompareOp::eAlways};
194+
.anisotropyEnable = vk::True, .maxAnisotropy = properties.limits.maxSamplerAnisotropy};
196195
----
197196

198197
You can either query the properties at the beginning of your program and pass them around to the functions that need them, or query them in the `createTextureSampler` function itself.

0 commit comments

Comments
 (0)