accleratedjob: simplified function calls
This commit is contained in:
@@ -77,18 +77,18 @@ ShaderCode MergeNode::GetShaderCode(const ShaderRequest &request) const
|
||||
void MergeNode::Value(const NodeValueRow &value, const NodeGlobals &globals, NodeValueTable *table) const
|
||||
{
|
||||
ShaderJob job;
|
||||
job.InsertValue(value);
|
||||
job.Insert(value);
|
||||
|
||||
TexturePtr base_tex = job.GetValue(kBaseIn).toTexture();
|
||||
TexturePtr blend_tex = job.GetValue(kBlendIn).toTexture();
|
||||
TexturePtr base_tex = job.Get(kBaseIn).toTexture();
|
||||
TexturePtr blend_tex = job.Get(kBlendIn).toTexture();
|
||||
|
||||
if (base_tex || blend_tex) {
|
||||
if (!base_tex || (blend_tex && blend_tex->channel_count() < VideoParams::kRGBAChannelCount)) {
|
||||
// We only have a blend texture or the blend texture is RGB only, no need to alpha over
|
||||
table->Push(job.GetValue(kBlendIn));
|
||||
table->Push(job.Get(kBlendIn));
|
||||
} else if (!blend_tex) {
|
||||
// We only have a base texture, no need to alpha over
|
||||
table->Push(job.GetValue(kBaseIn));
|
||||
table->Push(job.Get(kBaseIn));
|
||||
} else {
|
||||
// We have both textures, push the job
|
||||
if (base_tex->channel_count() < VideoParams::kRGBAChannelCount) {
|
||||
|
||||
Reference in New Issue
Block a user