Prechádzať zdrojové kódy

Allow any type of inputs for smoothstep

Popov72 4 rokov pred
rodič
commit
b000ba7c1b

+ 3 - 2
src/Materials/Node/Blocks/smoothStepBlock.ts

@@ -15,11 +15,12 @@ export class SmoothStepBlock extends NodeMaterialBlock {
     public constructor(name: string) {
     public constructor(name: string) {
         super(name, NodeMaterialBlockTargets.Neutral);
         super(name, NodeMaterialBlockTargets.Neutral);
 
 
-        this.registerInput("value", NodeMaterialBlockConnectionPointTypes.Float);
+        this.registerInput("value", NodeMaterialBlockConnectionPointTypes.AutoDetect);
         this.registerInput("edge0", NodeMaterialBlockConnectionPointTypes.Float);
         this.registerInput("edge0", NodeMaterialBlockConnectionPointTypes.Float);
         this.registerInput("edge1", NodeMaterialBlockConnectionPointTypes.Float);
         this.registerInput("edge1", NodeMaterialBlockConnectionPointTypes.Float);
-        this.registerOutput("output", NodeMaterialBlockConnectionPointTypes.Float);
+        this.registerOutput("output", NodeMaterialBlockConnectionPointTypes.BasedOnInput);
 
 
+        this._outputs[0]._typeConnectionSource = this._inputs[0];
     }
     }
 
 
     /**
     /**