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:
authorManuel Castilla <manzanillawork@gmail.com>2021-07-05 22:00:53 +0300
committerManuel Castilla <manzanillawork@gmail.com>2021-07-06 00:36:43 +0300
commitbf75106ae98206795818d702102c94a94bfe32a6 (patch)
tree44422d90e8443a96ef8d50498a603dc18e8f2498 /source/blender/compositor/operations/COM_ColorExposureOperation.cc
parentc94877ae3d38f2bd0a772caa09ad84647641b7f3 (diff)
Compositor: Full frame Exposure node
Adds full frame implementation to this node operation. No functional changes. 1.7x faster than tiled fallback. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D11766
Diffstat (limited to 'source/blender/compositor/operations/COM_ColorExposureOperation.cc')
-rw-r--r--source/blender/compositor/operations/COM_ColorExposureOperation.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/compositor/operations/COM_ColorExposureOperation.cc b/source/blender/compositor/operations/COM_ColorExposureOperation.cc
index 1512ff87658..9e527f269cf 100644
--- a/source/blender/compositor/operations/COM_ColorExposureOperation.cc
+++ b/source/blender/compositor/operations/COM_ColorExposureOperation.cc
@@ -52,6 +52,19 @@ void ExposureOperation::executePixelSampled(float output[4],
output[3] = inputValue[3];
}
+void ExposureOperation::update_memory_buffer_row(PixelCursor &p)
+{
+ for (; p.out < p.row_end; p.next()) {
+ const float *in_value = p.ins[0];
+ const float *in_exposure = p.ins[1];
+ const float exposure = pow(2, in_exposure[0]);
+ p.out[0] = in_value[0] * exposure;
+ p.out[1] = in_value[1] * exposure;
+ p.out[2] = in_value[2] * exposure;
+ p.out[3] = in_value[3];
+ }
+}
+
void ExposureOperation::deinitExecution()
{
this->m_inputProgram = nullptr;