code cleanup: compositor - define size for executePixel function output float array

This commit is contained in:
2012-08-10 14:07:24 +00:00
parent e877247789
commit 94a3945cf9
251 changed files with 852 additions and 874 deletions

View File

@@ -40,7 +40,7 @@ void MapUVOperation::initExecution()
this->m_inputUVProgram = this->getInputSocketReader(1);
}
void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
void MapUVOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float inputUV[4];
float uv_a[4], uv_b[4];
@@ -52,7 +52,7 @@ void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler s
this->m_inputUVProgram->read(inputUV, x, y, sampler);
if (inputUV[2] == 0.f) {
zero_v4(color);
zero_v4(output);
return;
}
/* adaptive sampling, red (U) channel */
@@ -107,11 +107,11 @@ void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler s
u = inputUV[0] * this->m_inputColorProgram->getWidth();
v = inputUV[1] * this->m_inputColorProgram->getHeight();
this->m_inputColorProgram->read(color, u, v, dx, dy);
this->m_inputColorProgram->read(output, u, v, dx, dy);
/* "premul" */
if (alpha < 1.0f) {
mul_v4_fl(color, alpha);
mul_v4_fl(output, alpha);
}
}