accleratedjob: simplified function calls

This commit is contained in:
itsmattkc
2022-05-09 15:16:46 -07:00
parent 6c7dbc8521
commit b88e15b8cf
33 changed files with 149 additions and 149 deletions
+5 -5
View File
@@ -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) {