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)
|
for (uint32_t i = 0; i < numFrames; ++i)
|
||||||
buffer[i] = sourceDepth * sourceBuffer[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 {
|
else {
|
||||||
|
ASSERT(targetFlags & kModIsAdditive);
|
||||||
for (uint32_t i = 0; i < numFrames; ++i)
|
for (uint32_t i = 0; i < numFrames; ++i)
|
||||||
buffer[i] = (sourceDepth + sourceDepthMod[i]) * sourceBuffer[i];
|
buffer[i] = (sourceDepth + sourceDepthMod[i]) * sourceBuffer[i];
|
||||||
}
|
}
|
||||||
|
|
@ -435,7 +440,7 @@ float* ModMatrix::getModulation(TargetId targetId)
|
||||||
multiplyMul1<float>(sourceDepth, sourceBuffer, buffer);
|
multiplyMul1<float>(sourceDepth, sourceBuffer, buffer);
|
||||||
else {
|
else {
|
||||||
for (uint32_t i = 0; i < numFrames; ++i)
|
for (uint32_t i = 0; i < numFrames; ++i)
|
||||||
buffer[i] *= (sourceDepth + sourceDepthMod[i]) * sourceBuffer[i];
|
buffer[i] *= (sourceDepth * sourceDepthMod[i]) * sourceBuffer[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue