28 VkSamplerCreateInfo sampler_info = {};
29 sampler_info.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
34 sampler_info.minLod = 0;
35 sampler_info.maxLod = 0;
40 sampler_info.magFilter = VK_FILTER_LINEAR;
41 sampler_info.minFilter = VK_FILTER_LINEAR;
44 sampler_info.mipmapMode = VK_SAMPLER_MIPMAP_MODE_LINEAR;
45 sampler_info.minLod = 0;
46 sampler_info.maxLod = 1000;
49 (
U.anisotropic_filter > 1) &&
52 sampler_info.anisotropyEnable = VK_TRUE;
53 sampler_info.maxAnisotropy =
U.anisotropic_filter;
58 sampler_info.magFilter = VK_FILTER_LINEAR;
59 sampler_info.minFilter = VK_FILTER_LINEAR;
60 sampler_info.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST;
61 sampler_info.minLod = 0;
62 sampler_info.maxLod = 1;
65 sampler_info.magFilter = VK_FILTER_LINEAR;
66 sampler_info.minFilter = VK_FILTER_LINEAR;
67 sampler_info.compareEnable = VK_TRUE;
68 sampler_info.compareOp = VK_COMPARE_OP_LESS_OR_EQUAL;
72 vkCreateSampler(device.
vk_handle(), &sampler_info,
nullptr, &vk_sampler_);
@ GPU_SAMPLER_CUSTOM_ICON
@ GPU_SAMPLER_CUSTOM_COMPARE
@ GPU_SAMPLER_STATE_TYPE_CUSTOM
@ GPU_SAMPLER_STATE_TYPE_PARAMETERS
@ GPU_SAMPLER_STATE_TYPE_INTERNAL
@ GPU_SAMPLER_FILTERING_MIPMAP
@ GPU_SAMPLER_FILTERING_ANISOTROPIC
@ GPU_SAMPLER_FILTERING_LINEAR