Cleanup: Renamed compositor executePixel functions and their 'read' wrappers in SocketReader.
Distinguish the 3 different methods for acquiring pixel color values (executePixel, executePixelSampled, executePixelFiltered). This makes it easier to keep track of the different sampling methods (and works nicer with IDEs that do code parsing). Differential Revision: http://developer.blender.org/D7
This commit is contained in:
@@ -37,13 +37,13 @@ void GammaOperation::initExecution()
|
||||
this->m_inputGammaProgram = this->getInputSocketReader(1);
|
||||
}
|
||||
|
||||
void GammaOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
|
||||
void GammaOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
|
||||
{
|
||||
float inputValue[4];
|
||||
float inputGamma[4];
|
||||
|
||||
this->m_inputProgram->read(inputValue, x, y, sampler);
|
||||
this->m_inputGammaProgram->read(inputGamma, x, y, sampler);
|
||||
this->m_inputProgram->readSampled(inputValue, x, y, sampler);
|
||||
this->m_inputGammaProgram->readSampled(inputGamma, x, y, sampler);
|
||||
const float gamma = inputGamma[0];
|
||||
/* check for negative to avoid nan's */
|
||||
output[0] = inputValue[0] > 0.0f ? powf(inputValue[0], gamma) : inputValue[0];
|
||||
|
||||
Reference in New Issue
Block a user