Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-08-16 14:13:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-16 14:13:04 +0400
commitadd9aea57391a6c496a0541d97ef870c442adc81 (patch)
treed5d9c4951a28f61a3b1c185e6049d38379af3bfa /source/blender/compositor/operations
parent121fd266b0ed4865dc995448985e1725fc42b3c8 (diff)
compositor - EWA filter was blurring too much by default, this caused the displace node to blur the image when no displacement was applied, making images fuzzy, the original C code has an interpolation option.
Added this option back and use for displace and UV composite nodes.
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r--source/blender/compositor/operations/COM_DisplaceOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_MapUVOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/compositor/operations/COM_DisplaceOperation.cpp b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
index 39f0ac7874b..31608c88274 100644
--- a/source/blender/compositor/operations/COM_DisplaceOperation.cpp
+++ b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
@@ -95,8 +95,8 @@ void DisplaceOperation::executePixel(float output[4], int x, int y, void *data)
dxt = signf(dxt) * maxf(fabsf(dxt), DISPLACE_EPSILON) / this->getWidth();
dyt = signf(dyt) * maxf(fabsf(dyt), DISPLACE_EPSILON) / this->getHeight();
- /* EWA filtering */
- this->m_inputColorProgram->read(output, u, v, dxt, dyt);
+ /* EWA filtering (without nearest it gets blurry with NO distortion) */
+ this->m_inputColorProgram->read(output, u, v, dxt, dyt, COM_PS_NEAREST);
}
void DisplaceOperation::deinitExecution()
diff --git a/source/blender/compositor/operations/COM_MapUVOperation.cpp b/source/blender/compositor/operations/COM_MapUVOperation.cpp
index 1a441b0ac9a..fe6ebcebf97 100644
--- a/source/blender/compositor/operations/COM_MapUVOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapUVOperation.cpp
@@ -107,7 +107,7 @@ void MapUVOperation::executePixel(float output[4], float x, float y, PixelSample
u = inputUV[0] * this->m_inputColorProgram->getWidth();
v = inputUV[1] * this->m_inputColorProgram->getHeight();
- this->m_inputColorProgram->read(output, u, v, dx, dy);
+ this->m_inputColorProgram->read(output, u, v, dx, dy, COM_PS_NEAREST);
/* "premul" */
if (alpha < 1.0f) {
diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
index a2385f79c04..03d41edda64 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
@@ -59,9 +59,9 @@ void ReadBufferOperation::executePixel(float output[4], float x, float y, PixelS
}
}
-void ReadBufferOperation::executePixel(float output[4], float x, float y, float dx, float dy)
+void ReadBufferOperation::executePixel(float output[4], float x, float y, float dx, float dy, PixelSampler sampler)
{
- m_buffer->readEWA(output, x, y, dx, dy);
+ m_buffer->readEWA(output, x, y, dx, dy, sampler);
}
bool ReadBufferOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.h b/source/blender/compositor/operations/COM_ReadBufferOperation.h
index 7958a4aee6b..7e3ac147ee3 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.h
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.h
@@ -40,7 +40,7 @@ public:
void *initializeTileData(rcti *rect);
void executePixel(float output[4], float x, float y, PixelSampler sampler);
- void executePixel(float output[4], float x, float y, float dx, float dy);
+ void executePixel(float output[4], float x, float y, float dx, float dy, PixelSampler sampler);
const bool isReadBufferOperation() const { return true; }
void setOffset(unsigned int offset) { this->m_offset = offset; }
unsigned int getOffset() { return this->m_offset; }