Handle multiplicative depth modulations
This commit is contained in:
parent
798f501a65
commit
de7d47a9f1
1 changed files with 6 additions and 1 deletions
|
|
@ -423,7 +423,12 @@ float* ModMatrix::getModulation(TargetId targetId)
|
|||
for (uint32_t i = 0; i < numFrames; ++i)
|
||||
buffer[i] = sourceDepth * sourceBuffer[i];
|
||||
}
|
||||
else if (targetFlags & kModIsMultiplicative) {
|
||||
for (uint32_t i = 0; i < numFrames; ++i)
|
||||
buffer[i] = (sourceDepth * sourceDepthMod[i]) * sourceBuffer[i];
|
||||
}
|
||||
else {
|
||||
ASSERT(targetFlags & kModIsAdditive);
|
||||
for (uint32_t i = 0; i < numFrames; ++i)
|
||||
buffer[i] = (sourceDepth + sourceDepthMod[i]) * sourceBuffer[i];
|
||||
}
|
||||
|
|
@ -435,7 +440,7 @@ float* ModMatrix::getModulation(TargetId targetId)
|
|||
multiplyMul1<float>(sourceDepth, sourceBuffer, buffer);
|
||||
else {
|
||||
for (uint32_t i = 0; i < numFrames; ++i)
|
||||
buffer[i] *= (sourceDepth + sourceDepthMod[i]) * sourceBuffer[i];
|
||||
buffer[i] *= (sourceDepth * sourceDepthMod[i]) * sourceBuffer[i];
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue