fix: support wrap mode decals on terrain's material
This commit is contained in:
@@ -1276,9 +1276,12 @@ namespace wi::terrain
|
||||
SamplerDesc samplerDesc;
|
||||
samplerDesc.filter = Filter::ANISOTROPIC;
|
||||
samplerDesc.max_anisotropy = 4;
|
||||
samplerDesc.address_u = TextureAddressMode::CLAMP;
|
||||
samplerDesc.address_v = TextureAddressMode::CLAMP;
|
||||
samplerDesc.address_w = TextureAddressMode::CLAMP;
|
||||
// Note: using wrap mode by intention!
|
||||
// Terrain itself doesn't need wrap mode, but decals will reuse the base material's sampler
|
||||
// and decals can use wrapped textures (texmuladd)
|
||||
samplerDesc.address_u = TextureAddressMode::WRAP;
|
||||
samplerDesc.address_v = TextureAddressMode::WRAP;
|
||||
samplerDesc.address_w = TextureAddressMode::WRAP;
|
||||
bool success = device->CreateSampler(&samplerDesc, &sampler);
|
||||
assert(success);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace wi::version
|
||||
// minor features, major updates, breaking compatibility changes
|
||||
const int minor = 71;
|
||||
// minor bug fixes, alterations, refactors, updates
|
||||
const int revision = 671;
|
||||
const int revision = 672;
|
||||
|
||||
const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user