Improve sampler
This commit is contained in:
parent
260051b42c
commit
c650dcd1e0
1 changed files with 12 additions and 4 deletions
|
@ -112,7 +112,7 @@ impl Sampler {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn pretty_sampler() -> SamplerBuilder {
|
||||
pub fn pretty_sampler(device: &Device, lod: f32) -> SamplerBuilder {
|
||||
SamplerBuilder {
|
||||
create_info: VkSamplerCreateInfo::new(
|
||||
0,
|
||||
|
@ -123,12 +123,20 @@ impl Sampler {
|
|||
VK_SAMPLER_ADDRESS_MODE_REPEAT,
|
||||
VK_SAMPLER_ADDRESS_MODE_REPEAT,
|
||||
0.0,
|
||||
true,
|
||||
8.0,
|
||||
device.physical_device().features().samplerAnisotropy.into(),
|
||||
if device.physical_device().features().samplerAnisotropy.into() {
|
||||
device
|
||||
.physical_device()
|
||||
.properties()
|
||||
.limits
|
||||
.maxSamplerAnisotropy
|
||||
} else {
|
||||
1.0
|
||||
},
|
||||
false,
|
||||
VK_COMPARE_OP_NEVER,
|
||||
0.0,
|
||||
0.0,
|
||||
lod,
|
||||
VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE,
|
||||
false,
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue