@galacean/engine-shaderlab 1.4.3 → 1.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1758,6 +1758,9 @@ var BuiltinFunction = /*#__PURE__*/ function() {
1758
1758
  list.push(fn);
1759
1759
  BuiltinFunctionTable.set(ident, list);
1760
1760
  };
1761
+ // TODO: correct the type deduce, consider the following case:
1762
+ // It incorrectly inferred the type of the following expression as float, which should be vec3.
1763
+ // max(scatterAmt.xyz,0.0001)
1761
1764
  BuiltinFunction.getFn = function getFn(ident, parameterTypes) {
1762
1765
  var list = BuiltinFunctionTable.get(ident);
1763
1766
  if (list) {
@@ -3694,12 +3697,13 @@ var TreeNode = /*#__PURE__*/ function() {
3694
3697
  ExpressionAstNode.prototype.init.call(this);
3695
3698
  if (this.children.length === 1) {
3696
3699
  this.type = this.children[0].type;
3697
- } else {
3698
- var exp1 = this.children[0];
3699
- var exp2 = this.children[2];
3700
- if (exp1.type === exp2.type) {
3701
- this.type = exp1.type;
3702
- }
3700
+ // TODO: Temporarily remove type deduce due to generic function type issue.
3701
+ // } else {
3702
+ // const exp1 = this.children[0] as MultiplicativeExpression;
3703
+ // const exp2 = this.children[2] as UnaryExpression;
3704
+ // if (exp1.type === exp2.type) {
3705
+ // this.type = exp1.type;
3706
+ // }
3703
3707
  }
3704
3708
  };
3705
3709
  return MultiplicativeExpression;
@@ -3718,12 +3722,13 @@ var TreeNode = /*#__PURE__*/ function() {
3718
3722
  ExpressionAstNode.prototype.init.call(this);
3719
3723
  if (this.children.length === 1) {
3720
3724
  this.type = this.children[0].type;
3721
- } else {
3722
- var exp1 = this.children[0];
3723
- var exp2 = this.children[2];
3724
- if (exp1.type === exp2.type) {
3725
- this.type = exp1.type;
3726
- }
3725
+ // TODO: Temporarily remove type deduce due to generic function type issue.
3726
+ // } else {
3727
+ // const exp1 = this.children[0] as AdditiveExpression;
3728
+ // const exp2 = this.children[2] as MultiplicativeExpression;
3729
+ // if (exp1.type === exp2.type) {
3730
+ // this.type = exp1.type;
3731
+ // }
3727
3732
  }
3728
3733
  };
3729
3734
  return AdditiveExpression;
@@ -8058,7 +8063,7 @@ ShaderLab._shaderPositionPool = ShaderLabUtils.createObjectPool(ShaderPosition);
8058
8063
  ShaderLab._shaderRangePool = ShaderLabUtils.createObjectPool(ShaderRange);
8059
8064
 
8060
8065
  //@ts-ignore
8061
- var version = "1.4.3";
8066
+ var version = "1.4.5";
8062
8067
  var mode = "Release";
8063
8068
  mode = "Verbose";
8064
8069
  console.log("Galacean Engine ShaderLab Version: " + version + " | Mode: " + mode);