소스 검색

[shgraph] Fixed cond and ifCondition missing defaults

Clément Espeute 1 년 전
부모
커밋
e22d3d5a1c
2개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 2
      hrt/shgraph/nodes/Cond.hx
  2. 2 2
      hrt/shgraph/nodes/IfCondition.hx

+ 2 - 2
hrt/shgraph/nodes/Cond.hx

@@ -17,8 +17,8 @@ class Cond extends ShaderNode {
 	override function getInputs() {
 		static var inputs : Array<ShaderNode.InputInfo> =
 			[
-				{name: "a", type: SgFloat(1)},
-				{name: "b", type: SgFloat(1)},
+				{name: "a", type: SgFloat(1), def: Const(0.0)},
+				{name: "b", type: SgFloat(1), def: Const(0.0)},
 			];
 		return inputs;
 	}

+ 2 - 2
hrt/shgraph/nodes/IfCondition.hx

@@ -17,8 +17,8 @@ class IfCondition extends ShaderNode {
 		static var inputs : Array<ShaderNode.InputInfo> =
 		[
 			{name: "condition", type: SgBool},
-			{name: "true", type: SgGeneric(0, ConstraintFloat)},
-			{name: "false", type: SgGeneric(0, ConstraintFloat)},
+			{name: "true", type: SgGeneric(0, ConstraintFloat), def: Const(1.0)},
+			{name: "false", type: SgGeneric(0, ConstraintFloat), def: Const(0.0)},
 		];
 		return inputs;
 	}