Differential D9630 Diff 31305 source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp
| Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | void DistanceRGBMatteOperation::executePixelSampled(float output[4], | ||||
| float distance; | float distance; | ||||
| float alpha; | float alpha; | ||||
| this->m_inputKeyProgram->readSampled(inKey, x, y, sampler); | this->m_inputKeyProgram->readSampled(inKey, x, y, sampler); | ||||
| this->m_inputImageProgram->readSampled(inImage, x, y, sampler); | this->m_inputImageProgram->readSampled(inImage, x, y, sampler); | ||||
| distance = this->calculateDistance(inKey, inImage); | distance = this->calculateDistance(inKey, inImage); | ||||
| /* store matte(alpha) value in [0] to go with | /* store matte(alpha) value in [0] to go with | ||||
| * COM_SetAlphaOperation and the Value output | * COM_SetAlphaMultiplyOperation and the Value output | ||||
EAW: Same. | |||||
| */ | */ | ||||
| /*make 100% transparent */ | /*make 100% transparent */ | ||||
| if (distance < tolerance) { | if (distance < tolerance) { | ||||
| output[0] = 0.0f; | output[0] = 0.0f; | ||||
| } | } | ||||
| /*in the falloff region, make partially transparent */ | /*in the falloff region, make partially transparent */ | ||||
| else if (distance < falloff + tolerance) { | else if (distance < falloff + tolerance) { | ||||
| Show All 15 Lines | |||||
Same.