diff --git a/NEW_RELEASE_NOTES.md b/NEW_RELEASE_NOTES.md index 6582a859a95..6338a459aa9 100644 --- a/NEW_RELEASE_NOTES.md +++ b/NEW_RELEASE_NOTES.md @@ -8,4 +8,5 @@ appropriate header in [RELEASE_NOTES.md](./RELEASE_NOTES.md). ## Release notes for next branch cut +- matc: fix buggy `variant-filter` flag - web: Added missing setMat3Parameter()/setMat4Parameter() to MaterialInstance diff --git a/libs/filabridge/src/Variant.cpp b/libs/filabridge/src/Variant.cpp index 905eab418a6..47cff314699 100644 --- a/libs/filabridge/src/Variant.cpp +++ b/libs/filabridge/src/Variant.cpp @@ -24,32 +24,32 @@ Variant Variant::filterUserVariant( Variant variant, UserVariantFilterMask filterMask) noexcept { // these are easy to filter by just removing the corresponding bit if (filterMask & (uint32_t)UserVariantFilterBit::DIRECTIONAL_LIGHTING) { - variant.key &= ~(filterMask & DIR); + variant.key &= ~DIR; } if (filterMask & (uint32_t)UserVariantFilterBit::DYNAMIC_LIGHTING) { - variant.key &= ~(filterMask & DYN); + variant.key &= ~DYN; } if (filterMask & (uint32_t)UserVariantFilterBit::SKINNING) { - variant.key &= ~(filterMask & SKN); + variant.key &= ~SKN; } if (!isValidDepthVariant(variant)) { // we can't remove FOG from depth variants, this would, in fact, remove picking if (filterMask & (uint32_t)UserVariantFilterBit::FOG) { - variant.key &= ~(filterMask & FOG); + variant.key &= ~FOG; } } else { // depth variants can have their VSM bit filtered if (filterMask & (uint32_t)UserVariantFilterBit::VSM) { - variant.key &= ~(filterMask & VSM); + variant.key &= ~VSM; } } if (!isSSRVariant(variant)) { // SSR variant needs to be handled separately if (filterMask & (uint32_t)UserVariantFilterBit::SHADOW_RECEIVER) { - variant.key &= ~(filterMask & SRE); + variant.key &= ~SRE; } if (filterMask & (uint32_t)UserVariantFilterBit::VSM) { - variant.key &= ~(filterMask & VSM); + variant.key &= ~VSM; } } else { // see if we need to filter out the SSR variants