pass colortransformjob alpha setting to shader
This commit is contained in:
@@ -100,7 +100,7 @@ void ChromaKeyNode::Value(const NodeValueRow &value, const NodeGlobals &globals,
|
||||
ColorTransformJob job;
|
||||
|
||||
job.InsertValue(value);
|
||||
job.SetInputAlphaAssociation(AlphaAssociated::kAlphaAssociated);
|
||||
job.SetAlphaChannelRequired(ColorTransformJob::kAlphaForceOn);
|
||||
job.SetColorProcessor(processor());
|
||||
job.SetInputTexture(value[kTextureInput].data().value<TexturePtr>());
|
||||
job.SetNeedsCustomShader(this);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <QMatrix4x4>
|
||||
#include <QString>
|
||||
|
||||
#include "render/job/acceleratedjob.h"
|
||||
#include "render/job/generatejob.h"
|
||||
#include "render/alphaassoc.h"
|
||||
#include "render/colorprocessor.h"
|
||||
#include "render/texture.h"
|
||||
@@ -33,7 +33,7 @@ namespace olive {
|
||||
|
||||
class Node;
|
||||
|
||||
class ColorTransformJob : public AcceleratedJob
|
||||
class ColorTransformJob : public GenerateJob
|
||||
{
|
||||
public:
|
||||
ColorTransformJob()
|
||||
|
||||
@@ -219,10 +219,7 @@ void Renderer::BlitColorManaged(const ColorTransformJob &color_job, Texture *des
|
||||
job.InsertValue(QStringLiteral("ove_cropmatrix"), NodeValue(NodeValue::kMatrix, color_job.GetCropMatrix().inverted()));
|
||||
job.InsertValue(QStringLiteral("ove_maintex_alpha"), NodeValue(NodeValue::kInt, color_job.GetInputAlphaAssociation()));
|
||||
job.InsertValue(color_job.GetValues());
|
||||
|
||||
//if (color_job.GetInputAlphaAssociation() == AlphaAssociated::kAlphaAssociated) {
|
||||
job.SetAlphaChannelRequired(GenerateJob::kAlphaForceOn);
|
||||
//}
|
||||
job.SetAlphaChannelRequired(color_job.GetAlphaChannelRequired());
|
||||
|
||||
foreach (const ColorContext::LUT& l, color_ctx.lut3d_textures) {
|
||||
job.InsertValue(l.name, NodeValue(NodeValue::kTexture, QVariant::fromValue(l.texture)));
|
||||
|
||||
@@ -576,7 +576,11 @@ SampleBufferPtr RenderProcessor::ProcessSamples(const Node *node, const TimeRang
|
||||
TexturePtr RenderProcessor::ProcessColorTransform(const Node *node, const ColorTransformJob &job)
|
||||
{
|
||||
TexturePtr src = job.GetInputTexture();
|
||||
TexturePtr dest = render_ctx_->CreateTexture(src->params());
|
||||
|
||||
VideoParams src_params = src->params();
|
||||
src_params.set_channel_count(GetChannelCountFromJob(job));
|
||||
|
||||
TexturePtr dest = render_ctx_->CreateTexture(src_params);
|
||||
|
||||
render_ctx_->BlitColorManaged(job, dest.get());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user