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
This commit is contained in:
parent
c94877ae3d
commit
bf75106ae9
|
@ -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;
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "COM_NodeOperation.h"
|
||||
#include "COM_MultiThreadedRowOperation.h"
|
||||
|
||||
namespace blender::compositor {
|
||||
|
||||
class ExposureOperation : public NodeOperation {
|
||||
class ExposureOperation : public MultiThreadedRowOperation {
|
||||
private:
|
||||
/**
|
||||
* Cached reference to the inputProgram
|
||||
|
@ -47,6 +47,8 @@ class ExposureOperation : public NodeOperation {
|
|||
* Deinitialize the execution
|
||||
*/
|
||||
void deinitExecution() override;
|
||||
|
||||
void update_memory_buffer_row(PixelCursor &p) override;
|
||||
};
|
||||
|
||||
} // namespace blender::compositor
|
||||
|
|
Loading…
Reference in New Issue