diff --git a/c2me-opts-dfc/src/main/java/com/ishland/c2me/opts/dfc/common/gen/BytecodeGen.java b/c2me-opts-dfc/src/main/java/com/ishland/c2me/opts/dfc/common/gen/BytecodeGen.java index 15855c37..daa1f01a 100644 --- a/c2me-opts-dfc/src/main/java/com/ishland/c2me/opts/dfc/common/gen/BytecodeGen.java +++ b/c2me-opts-dfc/src/main/java/com/ishland/c2me/opts/dfc/common/gen/BytecodeGen.java @@ -5,7 +5,13 @@ import com.ishland.c2me.opts.dfc.common.ast.McToAst; import com.ishland.c2me.opts.dfc.common.ast.dfvisitor.StripBlending; import com.ishland.c2me.opts.dfc.common.ast.misc.ConstantNode; +import com.ishland.c2me.opts.dfc.common.ast.misc.DelegateNode; import com.ishland.c2me.opts.dfc.common.ast.misc.RootNode; +import com.ishland.c2me.opts.dfc.common.ast.misc.YClampedGradientNode; +import com.ishland.c2me.opts.dfc.common.ast.noise.DFTNoiseNode; +import com.ishland.c2me.opts.dfc.common.ast.noise.DFTShiftANode; +import com.ishland.c2me.opts.dfc.common.ast.noise.DFTShiftBNode; +import com.ishland.c2me.opts.dfc.common.ast.noise.DFTShiftNode; import com.ishland.c2me.opts.dfc.common.util.ArrayCache; import com.ishland.c2me.opts.dfc.common.vif.AstVanillaInterface; import it.unimi.dsi.fastutil.Hash; @@ -82,6 +88,12 @@ public static DensityFunction compile(DensityFunction densityFunction, Reference AstNode ast = McToAst.toAst(densityFunction.apply(StripBlending.INSTANCE)); if (ast instanceof ConstantNode constantNode) { return DensityFunctionTypes.constant(constantNode.getValue()); + } else if (ast instanceof DFTNoiseNode || + ast instanceof DFTShiftANode || + ast instanceof DFTShiftBNode || + ast instanceof DFTShiftNode || + ast instanceof YClampedGradientNode) { + return densityFunction; } CompiledDensityFunction compiled = new CompiledDensityFunction(compile0(ast), densityFunction); tempCache.put(densityFunction, compiled);