@galacean/engine-core 1.0.0-beta.0 → 1.0.0-beta.3

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.
Files changed (54) hide show
  1. package/dist/main.js +124 -265
  2. package/dist/main.js.map +1 -1
  3. package/dist/miniprogram.js +124 -265
  4. package/dist/module.js +124 -265
  5. package/dist/module.js.map +1 -1
  6. package/package.json +3 -3
  7. package/types/2d/atlas/SpriteAtlas.d.ts +1 -0
  8. package/types/2d/data/RenderData2D.d.ts +1 -0
  9. package/types/2d/sprite/Sprite.d.ts +2 -1
  10. package/types/2d/sprite/SpriteMask.d.ts +2 -7
  11. package/types/2d/sprite/SpriteRenderer.d.ts +2 -11
  12. package/types/2d/text/Font.d.ts +1 -0
  13. package/types/2d/text/TextRenderer.d.ts +3 -11
  14. package/types/Camera.d.ts +0 -3
  15. package/types/Component.d.ts +1 -0
  16. package/types/Entity.d.ts +1 -1
  17. package/types/RenderPipeline/MeshRenderElement.d.ts +17 -0
  18. package/types/RenderPipeline/SpriteElement.d.ts +13 -0
  19. package/types/RenderPipeline/SpriteMaskElement.d.ts +10 -0
  20. package/types/RenderPipeline/TextRenderElement.d.ts +6 -0
  21. package/types/Renderer.d.ts +1 -1
  22. package/types/Scene.d.ts +1 -1
  23. package/types/Script.d.ts +1 -0
  24. package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +0 -1
  25. package/types/asset/GraphicsResource.d.ts +0 -3
  26. package/types/asset/IRefObject.d.ts +2 -0
  27. package/types/asset/RefObject.d.ts +27 -0
  28. package/types/asset/ReferResource.d.ts +0 -4
  29. package/types/base/Event.d.ts +24 -0
  30. package/types/base/Util.d.ts +14 -0
  31. package/types/env-probe/CubeProbe.d.ts +0 -6
  32. package/types/env-probe/Probe.d.ts +0 -6
  33. package/types/graphic/Buffer.d.ts +1 -3
  34. package/types/graphic/Mesh.d.ts +0 -6
  35. package/types/material/BaseMaterial.d.ts +0 -2
  36. package/types/material/BlinnPhongMaterial.d.ts +0 -3
  37. package/types/material/Material.d.ts +1 -4
  38. package/types/material/PBRMaterial.d.ts +1 -1
  39. package/types/material/PBRSpecularMaterial.d.ts +1 -1
  40. package/types/material/UnlitMaterial.d.ts +1 -1
  41. package/types/mesh/MeshRenderer.d.ts +3 -8
  42. package/types/mesh/ModelMesh.d.ts +1 -0
  43. package/types/mesh/SkinnedMeshRenderer.d.ts +0 -9
  44. package/types/physics/CharacterController.d.ts +0 -2
  45. package/types/physics/Collider.d.ts +1 -0
  46. package/types/physics/joint/HingeJoint.d.ts +2 -2
  47. package/types/physics/joint/SpringJoint.d.ts +1 -1
  48. package/types/sky/SkyBoxMaterial.d.ts +0 -3
  49. package/types/sky/SkyProceduralMaterial.d.ts +1 -1
  50. package/types/texture/RenderTarget.d.ts +0 -3
  51. package/types/texture/Texture.d.ts +1 -0
  52. package/types/texture/Texture2DArray.d.ts +0 -4
  53. package/types/texture/TextureCube.d.ts +0 -4
  54. package/types/trail/TrailRenderer.d.ts +1 -4
package/dist/module.js CHANGED
@@ -652,7 +652,6 @@ __decorate([
652
652
  }
653
653
  var _proto = ReferResource.prototype;
654
654
  /**
655
- * @override
656
655
  * Destroy self.
657
656
  * @param force - Whether to force the destruction, if it is false, refCount = 0 can be released successfully.
658
657
  * @returns Whether the release was successful.
@@ -679,9 +678,7 @@ __decorate([
679
678
  */ _proto._addToResourceManager = function _addToResourceManager(path) {
680
679
  this._engine.resourceManager._addAsset(path, this);
681
680
  };
682
- /**
683
- * @override
684
- */ _proto._onDestroy = function _onDestroy() {
681
+ _proto._onDestroy = function _onDestroy() {
685
682
  EngineObject.prototype._onDestroy.call(this);
686
683
  this._engine.resourceManager._deleteReferResource(this);
687
684
  var refCount = this._getReferCount();
@@ -813,9 +810,7 @@ var GraphicsResource = /*#__PURE__*/ function(ReferResource) {
813
810
  return _this;
814
811
  }
815
812
  var _proto = GraphicsResource.prototype;
816
- /**
817
- * @override
818
- */ _proto._onDestroy = function _onDestroy() {
813
+ _proto._onDestroy = function _onDestroy() {
819
814
  ReferResource.prototype._onDestroy.call(this);
820
815
  this.engine.resourceManager._deleteGraphicResource(this);
821
816
  };
@@ -884,7 +879,6 @@ var Logger = {
884
879
  }
885
880
  };
886
881
  /**
887
- * @override
888
882
  * @internal
889
883
  */ _proto._rebuild = function _rebuild() {
890
884
  var platformTexture = this._platformTexture;
@@ -895,10 +889,7 @@ var Logger = {
895
889
  platformTexture.depthCompareFunction = this._depthCompareFunction;
896
890
  platformTexture.setUseDepthCompareMode(this._useDepthCompareMode);
897
891
  };
898
- /**
899
- * @override
900
- * @internal
901
- */ _proto._onDestroy = function _onDestroy() {
892
+ _proto._onDestroy = function _onDestroy() {
902
893
  GraphicsResource.prototype._onDestroy.call(this);
903
894
  this._platformTexture.destroy();
904
895
  this._platformTexture = null;
@@ -1086,9 +1077,7 @@ var Logger = {
1086
1077
  this._depthTexture && this._depthTexture.generateMipmaps();
1087
1078
  }
1088
1079
  };
1089
- /**
1090
- * @override
1091
- */ _proto._onDestroy = function _onDestroy() {
1080
+ _proto._onDestroy = function _onDestroy() {
1092
1081
  GraphicsResource.prototype._onDestroy.call(this);
1093
1082
  this._platformRenderTarget.destroy();
1094
1083
  this._colorTextures.length = 0;
@@ -1106,7 +1095,6 @@ var Logger = {
1106
1095
  this._platformRenderTarget.blitRenderTarget();
1107
1096
  };
1108
1097
  /**
1109
- * @override
1110
1098
  * @internal
1111
1099
  */ _proto._rebuild = function _rebuild() {
1112
1100
  this._platformRenderTarget = this._engine._hardwareRenderer.createPlatformRenderTarget(this);
@@ -1309,7 +1297,7 @@ var Logger = {
1309
1297
  }
1310
1298
  };
1311
1299
  /**
1312
- * @override
1300
+ * @internal
1313
1301
  */ _proto._rebuild = function _rebuild() {
1314
1302
  this._platformTexture = this._engine._hardwareRenderer.createPlatformTexture2DArray(this);
1315
1303
  Texture.prototype._rebuild.call(this);
@@ -1393,7 +1381,7 @@ var Logger = {
1393
1381
  }
1394
1382
  };
1395
1383
  /**
1396
- * @override
1384
+ * @internal
1397
1385
  */ _proto._rebuild = function _rebuild() {
1398
1386
  this._platformTexture = this._engine._hardwareRenderer.createPlatformTextureCube(this);
1399
1387
  Texture.prototype._rebuild.call(this);
@@ -1467,10 +1455,7 @@ var Logger = {
1467
1455
  _proto.getCharInfo = function getCharInfo(char) {
1468
1456
  return this._charInfoMap[char.charCodeAt(0)];
1469
1457
  };
1470
- /**
1471
- * @override
1472
- * @internal
1473
- */ _proto._onDestroy = function _onDestroy() {
1458
+ _proto._onDestroy = function _onDestroy() {
1474
1459
  ReferResource.prototype._onDestroy.call(this);
1475
1460
  this.texture.destroy();
1476
1461
  this.texture = null;
@@ -2033,10 +2018,7 @@ var Logger = {
2033
2018
  subFontMap[key] = subFont;
2034
2019
  return subFont;
2035
2020
  };
2036
- /**
2037
- * @override
2038
- * @internal
2039
- */ _proto._onDestroy = function _onDestroy() {
2021
+ _proto._onDestroy = function _onDestroy() {
2040
2022
  ReferResource.prototype._onDestroy.call(this);
2041
2023
  var subFontMap = this._subFontMap;
2042
2024
  for(var k in subFontMap){
@@ -3208,54 +3190,6 @@ var GLCapabilityType;
3208
3190
  return ComponentsManager;
3209
3191
  }();
3210
3192
 
3211
- var ComponentCloner = /*#__PURE__*/ function() {
3212
- function ComponentCloner() {}
3213
- /**
3214
- * Clone component.
3215
- * @param source - Clone source
3216
- * @param target - Clone target
3217
- */ ComponentCloner.cloneComponent = function cloneComponent(source, target) {
3218
- var cloneModes = CloneManager.getCloneMode(source.constructor);
3219
- var keys = Object.keys(source);
3220
- for(var i = 0, n = keys.length; i < n; i++){
3221
- var k = keys[i];
3222
- var cloneMode = cloneModes[k];
3223
- switch(cloneMode){
3224
- case undefined:
3225
- case CloneMode.Assignment:
3226
- target[k] = source[k];
3227
- break;
3228
- case CloneMode.Shallow:
3229
- var sourcePropS = source[k];
3230
- if (_instanceof(sourcePropS, Object)) {
3231
- var tarProp = target[k];
3232
- tarProp == null && (tarProp = target[k] = sourcePropS.constructor());
3233
- Object.assign(tarProp, sourcePropS);
3234
- } else {
3235
- // Null or undefined and primitive type.
3236
- target[k] = sourcePropS;
3237
- }
3238
- break;
3239
- case CloneMode.Deep:
3240
- var sourcePropD = source[k];
3241
- if (_instanceof(sourcePropD, Object)) {
3242
- var tarProp1 = target[k];
3243
- tarProp1 == null && (tarProp1 = target[k] = sourcePropD.constructor());
3244
- CloneManager.deepCloneObject(sourcePropD, tarProp1);
3245
- } else {
3246
- // Null or undefined and primitive type.
3247
- target[k] = sourcePropD;
3248
- }
3249
- break;
3250
- }
3251
- }
3252
- if (source._cloneTo) {
3253
- source._cloneTo(target);
3254
- }
3255
- };
3256
- return ComponentCloner;
3257
- }();
3258
-
3259
3193
  /**
3260
3194
  * The base class of the components.
3261
3195
  */ var Component = /*#__PURE__*/ function(EngineObject) {
@@ -3303,10 +3237,7 @@ var ComponentCloner = /*#__PURE__*/ function() {
3303
3237
  }
3304
3238
  }
3305
3239
  };
3306
- /**
3307
- * @override
3308
- * @internal
3309
- */ _proto._onDestroy = function _onDestroy() {
3240
+ _proto._onDestroy = function _onDestroy() {
3310
3241
  EngineObject.prototype._onDestroy.call(this);
3311
3242
  this._entity._removeComponent(this);
3312
3243
  if (this._entity.isActiveInHierarchy) {
@@ -4538,6 +4469,54 @@ var TransformModifyFlags;
4538
4469
  TransformModifyFlags[TransformModifyFlags[/** WorldMatrix | WorldPosition | WorldEuler | WorldQuat | WorldScale */ "WmWpWeWqWs"] = 0xbc] = "WmWpWeWqWs";
4539
4470
  })(TransformModifyFlags || (TransformModifyFlags = {}));
4540
4471
 
4472
+ var ComponentCloner = /*#__PURE__*/ function() {
4473
+ function ComponentCloner() {}
4474
+ /**
4475
+ * Clone component.
4476
+ * @param source - Clone source
4477
+ * @param target - Clone target
4478
+ */ ComponentCloner.cloneComponent = function cloneComponent(source, target) {
4479
+ var cloneModes = CloneManager.getCloneMode(source.constructor);
4480
+ var keys = Object.keys(source);
4481
+ for(var i = 0, n = keys.length; i < n; i++){
4482
+ var k = keys[i];
4483
+ var cloneMode = cloneModes[k];
4484
+ switch(cloneMode){
4485
+ case undefined:
4486
+ case CloneMode.Assignment:
4487
+ target[k] = source[k];
4488
+ break;
4489
+ case CloneMode.Shallow:
4490
+ var sourcePropS = source[k];
4491
+ if (_instanceof(sourcePropS, Object)) {
4492
+ var tarProp = target[k];
4493
+ tarProp == null && (tarProp = target[k] = sourcePropS.constructor());
4494
+ Object.assign(tarProp, sourcePropS);
4495
+ } else {
4496
+ // Null or undefined and primitive type.
4497
+ target[k] = sourcePropS;
4498
+ }
4499
+ break;
4500
+ case CloneMode.Deep:
4501
+ var sourcePropD = source[k];
4502
+ if (_instanceof(sourcePropD, Object)) {
4503
+ var tarProp1 = target[k];
4504
+ tarProp1 == null && (tarProp1 = target[k] = sourcePropD.constructor());
4505
+ CloneManager.deepCloneObject(sourcePropD, tarProp1);
4506
+ } else {
4507
+ // Null or undefined and primitive type.
4508
+ target[k] = sourcePropD;
4509
+ }
4510
+ break;
4511
+ }
4512
+ }
4513
+ if (source._cloneTo) {
4514
+ source._cloneTo(target);
4515
+ }
4516
+ };
4517
+ return ComponentCloner;
4518
+ }();
4519
+
4541
4520
  /**
4542
4521
  * Entity, be used as components container.
4543
4522
  */ var Entity = /*#__PURE__*/ function(EngineObject) {
@@ -6022,21 +6001,16 @@ var Collider = /*#__PURE__*/ function(Component) {
6022
6001
  * @internal
6023
6002
  */ _proto._onLateUpdate = function _onLateUpdate() {};
6024
6003
  /**
6025
- * @override
6026
6004
  * @internal
6027
6005
  */ _proto._onEnable = function _onEnable() {
6028
6006
  this.engine.physicsManager._addCollider(this);
6029
6007
  };
6030
6008
  /**
6031
- * @override
6032
6009
  * @internal
6033
6010
  */ _proto._onDisable = function _onDisable() {
6034
6011
  this.engine.physicsManager._removeCollider(this);
6035
6012
  };
6036
- /**
6037
- * @override
6038
- * @internal
6039
- */ _proto._onDestroy = function _onDestroy() {
6013
+ _proto._onDestroy = function _onDestroy() {
6040
6014
  Component.prototype._onDestroy.call(this);
6041
6015
  this.clearShapes();
6042
6016
  this._nativeCollider.destroy();
@@ -6075,7 +6049,6 @@ Collider = __decorate([
6075
6049
  function CharacterController(entity) {
6076
6050
  var _this;
6077
6051
  _this = Collider.call(this, entity) || this;
6078
- /** @internal */ _this._index = -1;
6079
6052
  _this._stepOffset = 0.5;
6080
6053
  _this._nonWalkableMode = ControllerNonWalkableMode.PreventClimbing;
6081
6054
  _this._upDirection = new Vector3(0, 1, 0);
@@ -6099,7 +6072,6 @@ Collider = __decorate([
6099
6072
  /**
6100
6073
  * Add collider shape on this controller.
6101
6074
  * @param shape - Collider shape
6102
- * @override
6103
6075
  */ _proto.addShape = function addShape(shape) {
6104
6076
  if (this._shapes.length > 0) {
6105
6077
  throw "only allow single shape on controller!";
@@ -6109,7 +6081,6 @@ Collider = __decorate([
6109
6081
  };
6110
6082
  /**
6111
6083
  * Remove all shape attached.
6112
- * @override
6113
6084
  */ _proto.clearShapes = function clearShapes() {
6114
6085
  if (this._shapes.length > 0) {
6115
6086
  Collider.prototype.removeShape.call(this, this._shapes[0]);
@@ -6117,7 +6088,6 @@ Collider = __decorate([
6117
6088
  };
6118
6089
  /**
6119
6090
  * @internal
6120
- * @override
6121
6091
  */ _proto._onUpdate = function _onUpdate() {
6122
6092
  if (this._updateFlag.flag) {
6123
6093
  var transform = this.entity.transform;
@@ -6132,7 +6102,6 @@ Collider = __decorate([
6132
6102
  };
6133
6103
  /**
6134
6104
  * @internal
6135
- * @override
6136
6105
  */ _proto._onLateUpdate = function _onLateUpdate() {
6137
6106
  var position = this.entity.transform.worldPosition;
6138
6107
  this._nativeCollider.getWorldPosition(position);
@@ -6140,13 +6109,11 @@ Collider = __decorate([
6140
6109
  this._updateFlag.flag = false;
6141
6110
  };
6142
6111
  /**
6143
- * @override
6144
6112
  * @internal
6145
6113
  */ _proto._onEnable = function _onEnable() {
6146
6114
  this.engine.physicsManager._addCharacterController(this);
6147
6115
  };
6148
6116
  /**
6149
- * @override
6150
6117
  * @internal
6151
6118
  */ _proto._onDisable = function _onDisable() {
6152
6119
  this.engine.physicsManager._removeCharacterController(this);
@@ -6639,7 +6606,6 @@ Joint = __decorate([
6639
6606
  }
6640
6607
  var _proto = FixedJoint.prototype;
6641
6608
  /**
6642
- * @override
6643
6609
  * @internal
6644
6610
  */ _proto._onAwake = function _onAwake() {
6645
6611
  var collider = this._collider;
@@ -6673,7 +6639,6 @@ Joint = __decorate([
6673
6639
  }
6674
6640
  var _proto = HingeJoint.prototype;
6675
6641
  /**
6676
- * @override
6677
6642
  * @internal
6678
6643
  */ _proto._onAwake = function _onAwake() {
6679
6644
  var collider = this._collider;
@@ -6825,7 +6790,6 @@ Joint = __decorate([
6825
6790
  }
6826
6791
  var _proto = SpringJoint.prototype;
6827
6792
  /**
6828
- * @override
6829
6793
  * @internal
6830
6794
  */ _proto._onAwake = function _onAwake() {
6831
6795
  var collider = this._collider;
@@ -7030,7 +6994,6 @@ Joint = __decorate([
7030
6994
  this._nativeCollider.wakeUp();
7031
6995
  };
7032
6996
  /**
7033
- * @override
7034
6997
  * @internal
7035
6998
  */ _proto._onLateUpdate = function _onLateUpdate() {
7036
6999
  var transform = this.entity.transform;
@@ -7983,14 +7946,12 @@ __decorate([
7983
7946
  /**
7984
7947
  * Mount to the current Scene.
7985
7948
  * @internal
7986
- * @override
7987
7949
  */ _proto._onEnable = function _onEnable() {
7988
7950
  this.engine._lightManager._attachDirectLight(this);
7989
7951
  };
7990
7952
  /**
7991
7953
  * Unmount from the current Scene.
7992
7954
  * @internal
7993
- * @override
7994
7955
  */ _proto._onDisable = function _onDisable() {
7995
7956
  this.engine._lightManager._detachDirectLight(this);
7996
7957
  };
@@ -8024,7 +7985,6 @@ __decorate([
8024
7985
  key: "_shadowProjectionMatrix",
8025
7986
  get: /**
8026
7987
  * @internal
8027
- * @override
8028
7988
  */ function get() {
8029
7989
  throw "Unknown!";
8030
7990
  }
@@ -8084,14 +8044,12 @@ __decorate([
8084
8044
  /**
8085
8045
  * Mount to the current Scene.
8086
8046
  * @internal
8087
- * @override
8088
8047
  */ _proto._onEnable = function _onEnable() {
8089
8048
  this.engine._lightManager._attachPointLight(this);
8090
8049
  };
8091
8050
  /**
8092
8051
  * Unmount from the current Scene.
8093
8052
  * @internal
8094
- * @override
8095
8053
  */ _proto._onDisable = function _onDisable() {
8096
8054
  this.engine._lightManager._detachPointLight(this);
8097
8055
  };
@@ -8117,7 +8075,6 @@ __decorate([
8117
8075
  key: "_shadowProjectionMatrix",
8118
8076
  get: /**
8119
8077
  * @internal
8120
- * @override
8121
8078
  */ function get() {
8122
8079
  throw "Unknown!";
8123
8080
  }
@@ -8194,14 +8151,12 @@ __decorate([
8194
8151
  /**
8195
8152
  * Mount to the current Scene.
8196
8153
  * @internal
8197
- * @override
8198
8154
  */ _proto._onEnable = function _onEnable() {
8199
8155
  this.engine._lightManager._attachSpotLight(this);
8200
8156
  };
8201
8157
  /**
8202
8158
  * Unmount from the current Scene.
8203
8159
  * @internal
8204
- * @override
8205
8160
  */ _proto._onDisable = function _onDisable() {
8206
8161
  this.engine._lightManager._detachSpotLight(this);
8207
8162
  };
@@ -8247,7 +8202,6 @@ __decorate([
8247
8202
  key: "_shadowProjectionMatrix",
8248
8203
  get: /**
8249
8204
  * @internal
8250
- * @override
8251
8205
  */ function get() {
8252
8206
  var matrix = this._projectMatrix;
8253
8207
  var fov = Math.min(Math.PI / 2, this.angle * 2 * Math.sqrt(2));
@@ -9416,9 +9370,7 @@ __decorate([
9416
9370
  this.shaderData.cloneTo(target.shaderData);
9417
9371
  CloneManager.deepCloneObject(this.renderStates, target.renderStates);
9418
9372
  };
9419
- /**
9420
- * @override
9421
- */ _proto._addReferCount = function _addReferCount(value) {
9373
+ _proto._addReferCount = function _addReferCount(value) {
9422
9374
  ReferResource.prototype._addReferCount.call(this, value);
9423
9375
  this.shaderData._addReferCount(value);
9424
9376
  };
@@ -9553,11 +9505,11 @@ var FogFragmentDeclaration = "#define GLSLIFY 1\n#if SCENE_FOG_MODE != 0\nvaryin
9553
9505
 
9554
9506
  var FogVertexDeclaration = "#define GLSLIFY 1\n#if SCENE_FOG_MODE != 0\nvarying vec3 v_positionVS;\n#endif\n"; // eslint-disable-line
9555
9507
 
9556
- var normal_share = "#define GLSLIFY 1\n#ifndef MATERIAL_OMIT_NORMAL\n#ifdef RENDERER_HAS_NORMAL\nvarying vec3 v_normal;\n#if defined(RENDERER_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEARCOATNORMALTEXTURE) )\nvarying mat3 v_TBN;\n#endif\n#endif\n#endif\n"; // eslint-disable-line
9508
+ var normal_share = "#define GLSLIFY 1\n#ifndef MATERIAL_OMIT_NORMAL\n#ifdef RENDERER_HAS_NORMAL\nvarying vec3 v_normal;\n#if defined(RENDERER_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE) )\nvarying mat3 v_TBN;\n#endif\n#endif\n#endif\n"; // eslint-disable-line
9557
9509
 
9558
9510
  var uv_share = "#define GLSLIFY 1\nvarying vec2 v_uv;\n#ifdef RENDERER_HAS_UV1\nvarying vec2 v_uv1;\n#endif\n"; // eslint-disable-line
9559
9511
 
9560
- var worldpos_share = "#define GLSLIFY 1\n#ifdef MATERIAL_NEED_WORLDPOS\nvarying vec3 v_pos;\n#endif\n"; // eslint-disable-line
9512
+ var worldpos_share = "#define GLSLIFY 1\n#ifdef MATERIAL_NEED_WORLD_POS\nvarying vec3 v_pos;\n#endif\n"; // eslint-disable-line
9561
9513
 
9562
9514
  var begin_normal_vert = "#define GLSLIFY 1\n#ifndef MATERIAL_OMIT_NORMAL\n#ifdef RENDERER_HAS_NORMAL\nvec3 normal=vec3(NORMAL);\n#endif\n#ifdef RENDERER_HAS_TANGENT\nvec4 tangent=vec4(TANGENT);\n#endif\n#endif\n"; // eslint-disable-line
9563
9515
 
@@ -9565,21 +9517,21 @@ var begin_position_vert = "#define GLSLIFY 1\nvec4 position=vec4(POSITION,1.0);"
9565
9517
 
9566
9518
  var blendShape_input = "#define GLSLIFY 1\n#ifdef RENDERER_HAS_BLENDSHAPE\n#ifdef RENDERER_BLENDSHAPE_USE_TEXTURE\nuniform mediump sampler2DArray renderer_BlendShapeTexture;uniform ivec3 renderer_BlendShapeTextureInfo;uniform float renderer_BlendShapeWeights[RENDERER_BLENDSHAPE_COUNT];\n#else\nattribute vec3 POSITION_BS0;attribute vec3 POSITION_BS1;\n#if defined( RENDERER_BLENDSHAPE_HAS_NORMAL ) && defined( RENDERER_BLENDSHAPE_HAS_TANGENT )\nattribute vec3 NORMAL_BS0;attribute vec3 NORMAL_BS1;attribute vec3 TANGENT_BS0;attribute vec3 TANGENT_BS1;uniform float renderer_BlendShapeWeights[2];\n#else\n#if defined( RENDERER_BLENDSHAPE_HAS_NORMAL ) || defined( RENDERER_BLENDSHAPE_HAS_TANGENT )\nattribute vec3 POSITION_BS2;attribute vec3 POSITION_BS3;\n#ifdef RENDERER_BLENDSHAPE_HAS_NORMAL\nattribute vec3 NORMAL_BS0;attribute vec3 NORMAL_BS1;attribute vec3 NORMAL_BS2;attribute vec3 NORMAL_BS3;\n#endif\n#ifdef RENDERER_BLENDSHAPE_HAS_TANGENT\nattribute vec3 TANGENT_BS0;attribute vec3 TANGENT_BS1;attribute vec3 TANGENT_BS2;attribute vec3 TANGENT_BS3;\n#endif\nuniform float renderer_BlendShapeWeights[4];\n#else\nattribute vec3 POSITION_BS2;attribute vec3 POSITION_BS3;attribute vec3 POSITION_BS4;attribute vec3 POSITION_BS5;attribute vec3 POSITION_BS6;attribute vec3 POSITION_BS7;uniform float renderer_BlendShapeWeights[8];\n#endif\n#endif\n#endif\n#ifdef RENDERER_BLENDSHAPE_USE_TEXTURE\nvec3 getBlendShapeVertexElement(int blendShapeIndex,int vertexElementIndex){int y=vertexElementIndex/renderer_BlendShapeTextureInfo.y;int x=vertexElementIndex-y*renderer_BlendShapeTextureInfo.y;ivec3 uv=ivec3(x,y,blendShapeIndex);return texelFetch(renderer_BlendShapeTexture,uv,0).xyz;}\n#endif\n#endif\n"; // eslint-disable-line
9567
9519
 
9568
- var blendShape_vert = "#define GLSLIFY 1\n#ifdef RENDERER_HAS_BLENDSHAPE\n#ifdef RENDERER_BLENDSHAPE_USE_TEXTURE\nint vertexOffset=gl_VertexID*renderer_BlendShapeTextureInfo.x;for(int i=0;i<RENDERER_BLENDSHAPE_COUNT;i++){int vertexElementOffset=vertexOffset;float weight=renderer_BlendShapeWeights[i];position.xyz+=getBlendShapeVertexElement(i,vertexElementOffset)*weight;\n#ifndef MATERIAL_OMIT_NORMAL\n#if defined( RENDERER_HAS_NORMAL ) && defined( RENDERER_BLENDSHAPE_HAS_NORMAL )\nvertexElementOffset+=1;normal+=getBlendShapeVertexElement(i,vertexElementOffset)*weight;\n#endif\n#if defined( RENDERER_HAS_TANGENT ) && defined(RENDERER_BLENDSHAPE_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEARCOATNORMALTEXTURE) )\nvertexElementOffset+=1;tangent.xyz+=getBlendShapeVertexElement(i,vertexElementOffset)*weight;\n#endif\n#endif\n}\n#else\nposition.xyz+=POSITION_BS0*renderer_BlendShapeWeights[0];position.xyz+=POSITION_BS1*renderer_BlendShapeWeights[1];\n#if defined( RENDERER_BLENDSHAPE_HAS_NORMAL ) && defined( RENDERER_BLENDSHAPE_HAS_TANGENT )\n#ifndef MATERIAL_OMIT_NORMAL\n#ifdef RENDERER_HAS_NORMAL\nnormal+=NORMAL_BS0*renderer_BlendShapeWeights[0];normal+=NORMAL_BS1*renderer_BlendShapeWeights[1];\n#endif\n#if defined( RENDERER_HAS_TANGENT ) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEARCOATNORMALTEXTURE) )\ntangent.xyz+=TANGENT_BS0*renderer_BlendShapeWeights[0];tangent.xyz+=TANGENT_BS1*renderer_BlendShapeWeights[1];\n#endif\n#endif\n#else\n#if defined( RENDERER_BLENDSHAPE_HAS_NORMAL ) || defined( RENDERER_BLENDSHAPE_HAS_TANGENT )\n#ifndef MATERIAL_OMIT_NORMAL\nposition.xyz+=POSITION_BS2*renderer_BlendShapeWeights[2];position.xyz+=POSITION_BS3*renderer_BlendShapeWeights[3];\n#if defined( RENDERER_BLENDSHAPE_HAS_NORMAL ) && defined( RENDERER_HAS_NORMAL )\nnormal+=NORMAL_BS0*renderer_BlendShapeWeights[0];normal+=NORMAL_BS1*renderer_BlendShapeWeights[1];normal+=NORMAL_BS2*renderer_BlendShapeWeights[2];normal+=NORMAL_BS3*renderer_BlendShapeWeights[3];\n#endif\n#if defined(RENDERER_BLENDSHAPE_HAS_TANGENT) && defined( RENDERER_HAS_TANGENT ) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEARCOATNORMALTEXTURE) )\ntangent.xyz+=TANGENT_BS0*renderer_BlendShapeWeights[0];tangent.xyz+=TANGENT_BS1*renderer_BlendShapeWeights[1];tangent.xyz+=TANGENT_BS2*renderer_BlendShapeWeights[2];tangent.xyz+=TANGENT_BS3*renderer_BlendShapeWeights[3];\n#endif\n#endif\n#else\nposition.xyz+=POSITION_BS2*renderer_BlendShapeWeights[2];position.xyz+=POSITION_BS3*renderer_BlendShapeWeights[3];position.xyz+=POSITION_BS4*renderer_BlendShapeWeights[4];position.xyz+=POSITION_BS5*renderer_BlendShapeWeights[5];position.xyz+=POSITION_BS6*renderer_BlendShapeWeights[6];position.xyz+=POSITION_BS7*renderer_BlendShapeWeights[7];\n#endif\n#endif\n#endif\n#endif\n"; // eslint-disable-line
9520
+ var blendShape_vert = "#define GLSLIFY 1\n#ifdef RENDERER_HAS_BLENDSHAPE\n#ifdef RENDERER_BLENDSHAPE_USE_TEXTURE\nint vertexOffset=gl_VertexID*renderer_BlendShapeTextureInfo.x;for(int i=0;i<RENDERER_BLENDSHAPE_COUNT;i++){int vertexElementOffset=vertexOffset;float weight=renderer_BlendShapeWeights[i];position.xyz+=getBlendShapeVertexElement(i,vertexElementOffset)*weight;\n#ifndef MATERIAL_OMIT_NORMAL\n#if defined( RENDERER_HAS_NORMAL ) && defined( RENDERER_BLENDSHAPE_HAS_NORMAL )\nvertexElementOffset+=1;normal+=getBlendShapeVertexElement(i,vertexElementOffset)*weight;\n#endif\n#if defined( RENDERER_HAS_TANGENT ) && defined(RENDERER_BLENDSHAPE_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE) )\nvertexElementOffset+=1;tangent.xyz+=getBlendShapeVertexElement(i,vertexElementOffset)*weight;\n#endif\n#endif\n}\n#else\nposition.xyz+=POSITION_BS0*renderer_BlendShapeWeights[0];position.xyz+=POSITION_BS1*renderer_BlendShapeWeights[1];\n#if defined( RENDERER_BLENDSHAPE_HAS_NORMAL ) && defined( RENDERER_BLENDSHAPE_HAS_TANGENT )\n#ifndef MATERIAL_OMIT_NORMAL\n#ifdef RENDERER_HAS_NORMAL\nnormal+=NORMAL_BS0*renderer_BlendShapeWeights[0];normal+=NORMAL_BS1*renderer_BlendShapeWeights[1];\n#endif\n#if defined( RENDERER_HAS_TANGENT ) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE) )\ntangent.xyz+=TANGENT_BS0*renderer_BlendShapeWeights[0];tangent.xyz+=TANGENT_BS1*renderer_BlendShapeWeights[1];\n#endif\n#endif\n#else\n#if defined( RENDERER_BLENDSHAPE_HAS_NORMAL ) || defined( RENDERER_BLENDSHAPE_HAS_TANGENT )\n#ifndef MATERIAL_OMIT_NORMAL\nposition.xyz+=POSITION_BS2*renderer_BlendShapeWeights[2];position.xyz+=POSITION_BS3*renderer_BlendShapeWeights[3];\n#if defined( RENDERER_BLENDSHAPE_HAS_NORMAL ) && defined( RENDERER_HAS_NORMAL )\nnormal+=NORMAL_BS0*renderer_BlendShapeWeights[0];normal+=NORMAL_BS1*renderer_BlendShapeWeights[1];normal+=NORMAL_BS2*renderer_BlendShapeWeights[2];normal+=NORMAL_BS3*renderer_BlendShapeWeights[3];\n#endif\n#if defined(RENDERER_BLENDSHAPE_HAS_TANGENT) && defined( RENDERER_HAS_TANGENT ) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE) )\ntangent.xyz+=TANGENT_BS0*renderer_BlendShapeWeights[0];tangent.xyz+=TANGENT_BS1*renderer_BlendShapeWeights[1];tangent.xyz+=TANGENT_BS2*renderer_BlendShapeWeights[2];tangent.xyz+=TANGENT_BS3*renderer_BlendShapeWeights[3];\n#endif\n#endif\n#else\nposition.xyz+=POSITION_BS2*renderer_BlendShapeWeights[2];position.xyz+=POSITION_BS3*renderer_BlendShapeWeights[3];position.xyz+=POSITION_BS4*renderer_BlendShapeWeights[4];position.xyz+=POSITION_BS5*renderer_BlendShapeWeights[5];position.xyz+=POSITION_BS6*renderer_BlendShapeWeights[6];position.xyz+=POSITION_BS7*renderer_BlendShapeWeights[7];\n#endif\n#endif\n#endif\n#endif\n"; // eslint-disable-line
9569
9521
 
9570
9522
  var color_vert = "#define GLSLIFY 1\n#ifdef RENDERER_HAS_VERTEXCOLOR\nv_color=COLOR_0;\n#endif\n"; // eslint-disable-line
9571
9523
 
9572
9524
  var FogVertex = "#define GLSLIFY 1\n#if SCENE_FOG_MODE != 0\nvec4 positionVS=renderer_MVMat*position;v_positionVS=positionVS.xyz/positionVS.w;\n#endif\n"; // eslint-disable-line
9573
9525
 
9574
- var normal_vert = "#define GLSLIFY 1\n#ifndef MATERIAL_OMIT_NORMAL\n#ifdef RENDERER_HAS_NORMAL\nv_normal=normalize(mat3(renderer_NormalMat)*normal);\n#if defined(RENDERER_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEARCOATNORMALTEXTURE) )\nvec3 normalW=normalize(mat3(renderer_NormalMat)*normal.xyz);vec3 tangentW=normalize(mat3(renderer_NormalMat)*tangent.xyz);vec3 bitangentW=cross(normalW,tangentW)*tangent.w;v_TBN=mat3(tangentW,bitangentW,normalW);\n#endif\n#endif\n#endif\n"; // eslint-disable-line
9526
+ var normal_vert = "#define GLSLIFY 1\n#ifndef MATERIAL_OMIT_NORMAL\n#ifdef RENDERER_HAS_NORMAL\nv_normal=normalize(mat3(renderer_NormalMat)*normal);\n#if defined(RENDERER_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE) )\nvec3 normalW=normalize(mat3(renderer_NormalMat)*normal.xyz);vec3 tangentW=normalize(mat3(renderer_NormalMat)*tangent.xyz);vec3 bitangentW=cross(normalW,tangentW)*tangent.w;v_TBN=mat3(tangentW,bitangentW,normalW);\n#endif\n#endif\n#endif\n"; // eslint-disable-line
9575
9527
 
9576
9528
  var position_vert = "#define GLSLIFY 1\ngl_Position=renderer_MVPMat*position;"; // eslint-disable-line
9577
9529
 
9578
- var skinning_vert = "#define GLSLIFY 1\n#ifdef RENDERER_HAS_SKIN\n#ifdef RENDERER_USE_JOINT_TEXTURE\nmat4 skinMatrix=WEIGHTS_0.x*getJointMatrix(renderer_JointSampler,JOINTS_0.x)+WEIGHTS_0.y*getJointMatrix(renderer_JointSampler,JOINTS_0.y)+WEIGHTS_0.z*getJointMatrix(renderer_JointSampler,JOINTS_0.z)+WEIGHTS_0.w*getJointMatrix(renderer_JointSampler,JOINTS_0.w);\n#else\nmat4 skinMatrix=WEIGHTS_0.x*renderer_JointMatrix[int(JOINTS_0.x)]+WEIGHTS_0.y*renderer_JointMatrix[int(JOINTS_0.y)]+WEIGHTS_0.z*renderer_JointMatrix[int(JOINTS_0.z)]+WEIGHTS_0.w*renderer_JointMatrix[int(JOINTS_0.w)];\n#endif\nposition=skinMatrix*position;\n#if defined(RENDERER_HAS_NORMAL) && !defined(MATERIAL_OMIT_NORMAL)\nmat3 skinNormalMatrix=INVERSE_MAT(mat3(skinMatrix));normal=normal*skinNormalMatrix;\n#if defined(RENDERER_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEARCOATNORMALTEXTURE) )\ntangent.xyz=tangent.xyz*skinNormalMatrix;\n#endif\n#endif\n#endif\n"; // eslint-disable-line
9530
+ var skinning_vert = "#define GLSLIFY 1\n#ifdef RENDERER_HAS_SKIN\n#ifdef RENDERER_USE_JOINT_TEXTURE\nmat4 skinMatrix=WEIGHTS_0.x*getJointMatrix(renderer_JointSampler,JOINTS_0.x)+WEIGHTS_0.y*getJointMatrix(renderer_JointSampler,JOINTS_0.y)+WEIGHTS_0.z*getJointMatrix(renderer_JointSampler,JOINTS_0.z)+WEIGHTS_0.w*getJointMatrix(renderer_JointSampler,JOINTS_0.w);\n#else\nmat4 skinMatrix=WEIGHTS_0.x*renderer_JointMatrix[int(JOINTS_0.x)]+WEIGHTS_0.y*renderer_JointMatrix[int(JOINTS_0.y)]+WEIGHTS_0.z*renderer_JointMatrix[int(JOINTS_0.z)]+WEIGHTS_0.w*renderer_JointMatrix[int(JOINTS_0.w)];\n#endif\nposition=skinMatrix*position;\n#if defined(RENDERER_HAS_NORMAL) && !defined(MATERIAL_OMIT_NORMAL)\nmat3 skinNormalMatrix=INVERSE_MAT(mat3(skinMatrix));normal=normal*skinNormalMatrix;\n#if defined(RENDERER_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE) )\ntangent.xyz=tangent.xyz*skinNormalMatrix;\n#endif\n#endif\n#endif\n"; // eslint-disable-line
9579
9531
 
9580
- var uv_vert = "#define GLSLIFY 1\n#ifdef RENDERER_HAS_UV\nv_uv=TEXCOORD_0;\n#else\nv_uv=vec2(0.,0.);\n#endif\n#ifdef RENDERER_HAS_UV1\nv_uv1=TEXCOORD_1;\n#endif\n#ifdef MATERIAL_NEED_TILINGOFFSET\nv_uv=v_uv*material_TilingOffset.xy+material_TilingOffset.zw;\n#endif\n"; // eslint-disable-line
9532
+ var uv_vert = "#define GLSLIFY 1\n#ifdef RENDERER_HAS_UV\nv_uv=TEXCOORD_0;\n#else\nv_uv=vec2(0.,0.);\n#endif\n#ifdef RENDERER_HAS_UV1\nv_uv1=TEXCOORD_1;\n#endif\n#ifdef MATERIAL_NEED_TILING_OFFSET\nv_uv=v_uv*material_TilingOffset.xy+material_TilingOffset.zw;\n#endif\n"; // eslint-disable-line
9581
9533
 
9582
- var worldpos_vert = "#define GLSLIFY 1\n#ifdef MATERIAL_NEED_WORLDPOS\nvec4 temp_pos=renderer_ModelMat*position;v_pos=temp_pos.xyz/temp_pos.w;\n#endif\n"; // eslint-disable-line
9534
+ var worldpos_vert = "#define GLSLIFY 1\n#ifdef MATERIAL_NEED_WORLD_POS\nvec4 temp_pos=renderer_ModelMat*position;v_pos=temp_pos.xyz/temp_pos.w;\n#endif\n"; // eslint-disable-line
9583
9535
 
9584
9536
  var FogFragment = "#define GLSLIFY 1\n#if SCENE_FOG_MODE != 0\nfloat fogIntensity=ComputeFogIntensity(length(v_positionVS));gl_FragColor.rgb=mix(scene_FogColor.rgb,gl_FragColor.rgb,fogIntensity);\n#endif\n"; // eslint-disable-line
9585
9537
 
@@ -9589,7 +9541,7 @@ var mobile_material_frag = "#define GLSLIFY 1\nuniform vec4 material_EmissiveCol
9589
9541
 
9590
9542
  var begin_mobile_frag = "#define GLSLIFY 1\nvec4 ambient=vec4(0.0);vec4 emission=material_EmissiveColor;vec4 diffuse=material_BaseColor;vec4 specular=material_SpecularColor;\n#ifdef MATERIAL_HAS_EMISSIVETEXTURE\nvec4 emissiveTextureColor=texture2D(material_EmissiveTexture,v_uv);\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\nemissiveTextureColor=gammaToLinear(emissiveTextureColor);\n#endif\nemission*=emissiveTextureColor;\n#endif\n#ifdef MATERIAL_HAS_BASETEXTURE\nvec4 diffuseTextureColor=texture2D(material_BaseTexture,v_uv);\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\ndiffuseTextureColor=gammaToLinear(diffuseTextureColor);\n#endif\ndiffuse*=diffuseTextureColor;\n#endif\n#ifdef RENDERER_HAS_VERTEXCOLOR\ndiffuse*=v_color;\n#endif\n#ifdef MATERIAL_HAS_SPECULAR_TEXTURE\nvec4 specularTextureColor=texture2D(material_SpecularTexture,v_uv);\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\nspecularTextureColor=gammaToLinear(specularTextureColor);\n#endif\nspecular*=specularTextureColor;\n#endif\nambient=vec4(scene_EnvMapLight.diffuse*scene_EnvMapLight.diffuseIntensity,1.0)*diffuse;"; // eslint-disable-line
9591
9543
 
9592
- var begin_viewdir_frag = "#define GLSLIFY 1\n#ifdef MATERIAL_NEED_WORLDPOS\nvec3 V=normalize(camera_Position-v_pos);\n#endif\n"; // eslint-disable-line
9544
+ var begin_viewdir_frag = "#define GLSLIFY 1\n#ifdef MATERIAL_NEED_WORLD_POS\nvec3 V=normalize(camera_Position-v_pos);\n#endif\n"; // eslint-disable-line
9593
9545
 
9594
9546
  var mobile_blinnphong_frag = "#define GLSLIFY 1\n#ifdef MATERIAL_HAS_NORMALTEXTURE\nmat3 tbn=getTBN();vec3 N=getNormalByNormalTexture(tbn,material_NormalTexture,material_NormalIntensity,v_uv);\n#else\nvec3 N=getNormal();\n#endif\nvec3 lightDiffuse=vec3(0.0,0.0,0.0);vec3 lightSpecular=vec3(0.0,0.0,0.0);float shadowAttenuation=1.0;\n#ifdef SCENE_DIRECT_LIGHT_COUNT\nshadowAttenuation=1.0;\n#ifdef SCENE_IS_CALCULATE_SHADOWS\nshadowAttenuation*=sampleShadowMap();int sunIndex=int(scene_ShadowInfo.z);\n#endif\nDirectLight directionalLight;for(int i=0;i<SCENE_DIRECT_LIGHT_COUNT;i++){if(isRendererCulledByLight(renderer_Layer.xy,scene_DirectLightCullingMask[i]))continue;directionalLight.color=scene_DirectLightColor[i];\n#ifdef SCENE_IS_CALCULATE_SHADOWS\nif(i==sunIndex){directionalLight.color*=shadowAttenuation;}\n#endif\ndirectionalLight.direction=scene_DirectLightDirection[i];float d=max(dot(N,-directionalLight.direction),0.0);lightDiffuse+=directionalLight.color*d;vec3 halfDir=normalize(V-directionalLight.direction);float s=pow(clamp(dot(N,halfDir),0.0,1.0),material_Shininess);lightSpecular+=directionalLight.color*s;}\n#endif\n#ifdef SCENE_POINT_LIGHT_COUNT\nPointLight pointLight;for(int i=0;i<SCENE_POINT_LIGHT_COUNT;i++){if(isRendererCulledByLight(renderer_Layer.xy,scene_PointLightCullingMask[i]))continue;pointLight.color=scene_PointLightColor[i];pointLight.position=scene_PointLightPosition[i];pointLight.distance=scene_PointLightDistance[i];vec3 direction=v_pos-pointLight.position;float dist=length(direction);direction/=dist;float decay=clamp(1.0-pow(dist/pointLight.distance,4.0),0.0,1.0);float d=max(dot(N,-direction),0.0)*decay;lightDiffuse+=pointLight.color*d;vec3 halfDir=normalize(V-direction);float s=pow(clamp(dot(N,halfDir),0.0,1.0),material_Shininess)*decay;lightSpecular+=pointLight.color*s;}\n#endif\n#ifdef SCENE_SPOT_LIGHT_COUNT\nSpotLight spotLight;for(int i=0;i<SCENE_SPOT_LIGHT_COUNT;i++){if(isRendererCulledByLight(renderer_Layer.xy,scene_SpotLightCullingMask[i]))continue;spotLight.color=scene_SpotLightColor[i];spotLight.position=scene_SpotLightPosition[i];spotLight.direction=scene_SpotLightDirection[i];spotLight.distance=scene_SpotLightDistance[i];spotLight.angleCos=scene_SpotLightAngleCos[i];spotLight.penumbraCos=scene_SpotLightPenumbraCos[i];vec3 direction=spotLight.position-v_pos;float lightDistance=length(direction);direction/=lightDistance;float angleCos=dot(direction,-spotLight.direction);float decay=clamp(1.0-pow(lightDistance/spotLight.distance,4.0),0.0,1.0);float spotEffect=smoothstep(spotLight.penumbraCos,spotLight.angleCos,angleCos);float decayTotal=decay*spotEffect;float d=max(dot(N,direction),0.0)*decayTotal;lightDiffuse+=spotLight.color*d;vec3 halfDir=normalize(V+direction);float s=pow(clamp(dot(N,halfDir),0.0,1.0),material_Shininess)*decayTotal;lightSpecular+=spotLight.color*s;}\n#endif\ndiffuse*=vec4(lightDiffuse,1.0);specular*=vec4(lightSpecular,1.0);\n#ifdef MATERIAL_IS_ALPHA_CUTOFF\nif(diffuse.a<material_AlphaCutoff){discard;}\n#endif\n"; // eslint-disable-line
9595
9547
 
@@ -9625,17 +9577,17 @@ var noise_simplex_3D_grad = "#define GLSLIFY 1\nfloat simplex(vec3 v,out vec3 gr
9625
9577
 
9626
9578
  var noise_simplex_4D = "#define GLSLIFY 1\nvec4 grad4(float j,vec4 ip){const vec4 ones=vec4(1.0,1.0,1.0,-1.0);vec4 p,s;p.xyz=floor(fract(vec3(j)*ip.xyz)*7.0)*ip.z-1.0;p.w=1.5-dot(abs(p.xyz),ones.xyz);s=vec4(lessThan(p,vec4(0.0)));p.xyz=p.xyz+(s.xyz*2.0-1.0)*s.www;return p;}\n#define F4 0.309016994374947451\nfloat simplex(vec4 v){const vec4 C=vec4(0.138196601125011,0.276393202250021,0.414589803375032,-0.447213595499958);vec4 i=floor(v+dot(v,vec4(F4)));vec4 x0=v-i+dot(i,C.xxxx);vec4 i0;vec3 isX=step(x0.yzw,x0.xxx);vec3 isYZ=step(x0.zww,x0.yyz);i0.x=isX.x+isX.y+isX.z;i0.yzw=1.0-isX;i0.y+=isYZ.x+isYZ.y;i0.zw+=1.0-isYZ.xy;i0.z+=isYZ.z;i0.w+=1.0-isYZ.z;vec4 i3=clamp(i0,0.0,1.0);vec4 i2=clamp(i0-1.0,0.0,1.0);vec4 i1=clamp(i0-2.0,0.0,1.0);vec4 x1=x0-i1+C.xxxx;vec4 x2=x0-i2+C.yyyy;vec4 x3=x0-i3+C.zzzz;vec4 x4=x0+C.wwww;i=mod289(i);float j0=permute(permute(permute(permute(i.w)+i.z)+i.y)+i.x);vec4 j1=permute(permute(permute(permute(i.w+vec4(i1.w,i2.w,i3.w,1.0))+i.z+vec4(i1.z,i2.z,i3.z,1.0))+i.y+vec4(i1.y,i2.y,i3.y,1.0))+i.x+vec4(i1.x,i2.x,i3.x,1.0));vec4 ip=vec4(1.0/294.0,1.0/49.0,1.0/7.0,0.0);vec4 p0=grad4(j0,ip);vec4 p1=grad4(j1.x,ip);vec4 p2=grad4(j1.y,ip);vec4 p3=grad4(j1.z,ip);vec4 p4=grad4(j1.w,ip);vec4 norm=taylorInvSqrt(vec4(dot(p0,p0),dot(p1,p1),dot(p2,p2),dot(p3,p3)));p0*=norm.x;p1*=norm.y;p2*=norm.z;p3*=norm.w;p4*=taylorInvSqrt(dot(p4,p4));vec3 m0=max(0.6-vec3(dot(x0,x0),dot(x1,x1),dot(x2,x2)),0.0);vec2 m1=max(0.6-vec2(dot(x3,x3),dot(x4,x4)),0.0);m0=m0*m0;m1=m1*m1;return 49.0*(dot(m0*m0,vec3(dot(p0,x0),dot(p1,x1),dot(p2,x2)))+dot(m1*m1,vec2(dot(p3,x3),dot(p4,x4))));}"; // eslint-disable-line
9627
9579
 
9628
- var pbr_frag_define = "#define GLSLIFY 1\nuniform float material_AlphaCutoff;uniform vec4 material_BaseColor;uniform float material_Metal;uniform float material_Roughness;uniform vec3 material_PBRSpecularColor;uniform float material_Glossiness;uniform vec3 material_EmissiveColor;\n#ifdef MATERIAL_CLEARCOAT\nuniform float material_ClearCoat;uniform float material_ClearCoatRoughness;\n#endif\nuniform float material_NormalIntensity;uniform float material_OcclusionIntensity;uniform float material_OcclusionTextureCoord;\n#ifdef MATERIAL_HAS_BASETEXTURE\nuniform sampler2D material_BaseTexture;\n#endif\n#ifdef MATERIAL_HAS_NORMALTEXTURE\nuniform sampler2D material_NormalTexture;\n#endif\n#ifdef MATERIAL_HAS_EMISSIVETEXTURE\nuniform sampler2D MATERIAL_HAS_EMISSIVETEXTURE;\n#endif\n#ifdef MATERIAL_ROUGHNESSMETALLICTEXTURE\nuniform sampler2D material_RoughnessMetallicTexture;\n#endif\n#ifdef MATERIAL_HAS_SPECULARGLOSSINESSTEXTURE\nuniform sampler2D material_SpecularGlossinessTexture;\n#endif\n#ifdef MATERIAL_OCCLUSIONTEXTURE\nuniform sampler2D material_OcclusionTexture;\n#endif\n#ifdef MATERIAL_HAS_CLEARCOATTEXTURE\nuniform sampler2D material_ClearCoatTexture;\n#endif\n#ifdef MATERIAL_HAS_CLEARCOATROUGHNESSTEXTURE\nuniform sampler2D material_ClearCoatRoughnessTexture;\n#endif\n#ifdef MATERIAL_HAS_CLEARCOATNORMALTEXTURE\nuniform sampler2D material_ClearCoatNormalTexture;\n#endif\nstruct ReflectedLight{vec3 directDiffuse;vec3 directSpecular;vec3 indirectDiffuse;vec3 indirectSpecular;};struct Geometry{vec3 position;vec3 normal;vec3 viewDir;float dotNV;\n#ifdef MATERIAL_CLEARCOAT\nvec3 clearCoatNormal;float clearCoatDotNV;\n#endif\n};struct Material{vec3 diffuseColor;float roughness;vec3 specularColor;float opacity;\n#ifdef MATERIAL_CLEARCOAT\nfloat clearCoat;float clearCoatRoughness;\n#endif\n};"; // eslint-disable-line
9580
+ var pbr_frag_define = "#define GLSLIFY 1\nuniform float material_AlphaCutoff;uniform vec4 material_BaseColor;uniform float material_Metal;uniform float material_Roughness;uniform vec3 material_PBRSpecularColor;uniform float material_Glossiness;uniform vec3 material_EmissiveColor;\n#ifdef MATERIAL_ENABLE_CLEAR_COAT\nuniform float material_ClearCoat;uniform float material_ClearCoatRoughness;\n#endif\nuniform float material_NormalIntensity;uniform float material_OcclusionIntensity;uniform float material_OcclusionTextureCoord;\n#ifdef MATERIAL_HAS_BASETEXTURE\nuniform sampler2D material_BaseTexture;\n#endif\n#ifdef MATERIAL_HAS_NORMALTEXTURE\nuniform sampler2D material_NormalTexture;\n#endif\n#ifdef MATERIAL_HAS_EMISSIVETEXTURE\nuniform sampler2D material_EmissiveTexture;\n#endif\n#ifdef MATERIAL_HAS_ROUGHNESS_METALLIC_TEXTURE\nuniform sampler2D material_RoughnessMetallicTexture;\n#endif\n#ifdef MATERIAL_HAS_SPECULAR_GLOSSINESS_TEXTURE\nuniform sampler2D material_SpecularGlossinessTexture;\n#endif\n#ifdef MATERIAL_HAS_OCCLUSION_TEXTURE\nuniform sampler2D material_OcclusionTexture;\n#endif\n#ifdef MATERIAL_HAS_CLEAR_COAT_TEXTURE\nuniform sampler2D material_ClearCoatTexture;\n#endif\n#ifdef MATERIAL_HAS_CLEAR_COAT_ROUGHNESS_TEXTURE\nuniform sampler2D material_ClearCoatRoughnessTexture;\n#endif\n#ifdef MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE\nuniform sampler2D material_ClearCoatNormalTexture;\n#endif\nstruct ReflectedLight{vec3 directDiffuse;vec3 directSpecular;vec3 indirectDiffuse;vec3 indirectSpecular;};struct Geometry{vec3 position;vec3 normal;vec3 viewDir;float dotNV;\n#ifdef MATERIAL_ENABLE_CLEAR_COAT\nvec3 clearCoatNormal;float clearCoatDotNV;\n#endif\n};struct Material{vec3 diffuseColor;float roughness;vec3 specularColor;float opacity;\n#ifdef MATERIAL_ENABLE_CLEAR_COAT\nfloat clearCoat;float clearCoatRoughness;\n#endif\n};"; // eslint-disable-line
9629
9581
 
9630
- var pbr_helper = "#define GLSLIFY 1\n#include <normal_get>\nfloat computeSpecularOcclusion(float ambientOcclusion,float roughness,float dotNV){return saturate(pow(dotNV+ambientOcclusion,exp2(-16.0*roughness-1.0))-1.0+ambientOcclusion);}float getAARoughnessFactor(vec3 normal){\n#ifdef HAS_DERIVATIVES\nvec3 dxy=max(abs(dFdx(normal)),abs(dFdy(normal)));return 0.04+max(max(dxy.x,dxy.y),dxy.z);\n#else\nreturn 0.04;\n#endif\n}void initGeometry(out Geometry geometry){geometry.position=v_pos;geometry.viewDir=normalize(camera_Position-v_pos);\n#if defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEARCOATNORMALTEXTURE)\nmat3 tbn=getTBN();\n#endif\n#ifdef MATERIAL_HAS_NORMALTEXTURE\ngeometry.normal=getNormalByNormalTexture(tbn,material_NormalTexture,material_NormalIntensity,v_uv);\n#else\ngeometry.normal=getNormal();\n#endif\ngeometry.dotNV=saturate(dot(geometry.normal,geometry.viewDir));\n#ifdef MATERIAL_CLEARCOAT\n#ifdef MATERIAL_HAS_CLEARCOATNORMALTEXTURE\ngeometry.clearCoatNormal=getNormalByNormalTexture(tbn,material_ClearCoatNormalTexture,material_NormalIntensity,v_uv);\n#else\ngeometry.clearCoatNormal=getNormal();\n#endif\ngeometry.clearCoatDotNV=saturate(dot(geometry.clearCoatNormal,geometry.viewDir));\n#endif\n}void initMaterial(out Material material,const in Geometry geometry){vec4 baseColor=material_BaseColor;float metal=material_Metal;float roughness=material_Roughness;vec3 specularColor=material_PBRSpecularColor;float glossiness=material_Glossiness;float alphaCutoff=material_AlphaCutoff;\n#ifdef MATERIAL_HAS_BASETEXTURE\nvec4 baseTextureColor=texture2D(material_BaseTexture,v_uv);\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\nbaseTextureColor=gammaToLinear(baseTextureColor);\n#endif\nbaseColor*=baseTextureColor;\n#endif\n#ifdef RENDERER_HAS_VERTEXCOLOR\nbaseColor*=v_color;\n#endif\n#ifdef MATERIAL_IS_ALPHA_CUTOFF\nif(baseColor.a<alphaCutoff){discard;}\n#endif\n#ifdef MATERIAL_ROUGHNESSMETALLICTEXTURE\nvec4 metalRoughMapColor=texture2D(material_RoughnessMetallicTexture,v_uv);roughness*=metalRoughMapColor.g;metal*=metalRoughMapColor.b;\n#endif\n#ifdef MATERIAL_HAS_SPECULARGLOSSINESSTEXTURE\nvec4 specularGlossinessColor=texture2D(material_SpecularGlossinessTexture,v_uv);\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\nspecularGlossinessColor=gammaToLinear(specularGlossinessColor);\n#endif\nspecularColor*=specularGlossinessColor.rgb;glossiness*=specularGlossinessColor.a;\n#endif\n#ifdef IS_METALLIC_WORKFLOW\nmaterial.diffuseColor=baseColor.rgb*(1.0-metal);material.specularColor=mix(vec3(0.04),baseColor.rgb,metal);material.roughness=roughness;\n#else\nfloat specularStrength=max(max(specularColor.r,specularColor.g),specularColor.b);material.diffuseColor=baseColor.rgb*(1.0-specularStrength);material.specularColor=specularColor;material.roughness=1.0-glossiness;\n#endif\nmaterial.roughness=max(material.roughness,getAARoughnessFactor(geometry.normal));\n#ifdef MATERIAL_CLEARCOAT\nmaterial.clearCoat=material_ClearCoat;material.clearCoatRoughness=material_ClearCoatRoughness;\n#ifdef MATERIAL_HAS_CLEARCOATTEXTURE\nmaterial.clearCoat*=texture2D(material_ClearCoatTexture,v_uv).r;\n#endif\n#ifdef MATERIAL_HAS_CLEARCOATROUGHNESSTEXTURE\nmaterial.clearCoatRoughness*=texture2D(material_ClearCoatRoughnessTexture,v_uv).g;\n#endif\nmaterial.clearCoat=saturate(material.clearCoat);material.clearCoatRoughness=max(material.clearCoatRoughness,getAARoughnessFactor(geometry.clearCoatNormal));\n#endif\n#ifdef MATERIAL_IS_TRANSPARENT\nmaterial.opacity=baseColor.a;\n#else\nmaterial.opacity=1.0;\n#endif\n}\n#include <brdf>\n#include <direct_irradiance_frag_define>\n#include <ibl_frag_define>\n"; // eslint-disable-line
9582
+ var pbr_helper = "#define GLSLIFY 1\n#include <normal_get>\nfloat computeSpecularOcclusion(float ambientOcclusion,float roughness,float dotNV){return saturate(pow(dotNV+ambientOcclusion,exp2(-16.0*roughness-1.0))-1.0+ambientOcclusion);}float getAARoughnessFactor(vec3 normal){\n#ifdef HAS_DERIVATIVES\nvec3 dxy=max(abs(dFdx(normal)),abs(dFdy(normal)));return 0.04+max(max(dxy.x,dxy.y),dxy.z);\n#else\nreturn 0.04;\n#endif\n}void initGeometry(out Geometry geometry){geometry.position=v_pos;geometry.viewDir=normalize(camera_Position-v_pos);\n#if defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE)\nmat3 tbn=getTBN();\n#endif\n#ifdef MATERIAL_HAS_NORMALTEXTURE\ngeometry.normal=getNormalByNormalTexture(tbn,material_NormalTexture,material_NormalIntensity,v_uv);\n#else\ngeometry.normal=getNormal();\n#endif\ngeometry.dotNV=saturate(dot(geometry.normal,geometry.viewDir));\n#ifdef MATERIAL_ENABLE_CLEAR_COAT\n#ifdef MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE\ngeometry.clearCoatNormal=getNormalByNormalTexture(tbn,material_ClearCoatNormalTexture,material_NormalIntensity,v_uv);\n#else\ngeometry.clearCoatNormal=getNormal();\n#endif\ngeometry.clearCoatDotNV=saturate(dot(geometry.clearCoatNormal,geometry.viewDir));\n#endif\n}void initMaterial(out Material material,const in Geometry geometry){vec4 baseColor=material_BaseColor;float metal=material_Metal;float roughness=material_Roughness;vec3 specularColor=material_PBRSpecularColor;float glossiness=material_Glossiness;float alphaCutoff=material_AlphaCutoff;\n#ifdef MATERIAL_HAS_BASETEXTURE\nvec4 baseTextureColor=texture2D(material_BaseTexture,v_uv);\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\nbaseTextureColor=gammaToLinear(baseTextureColor);\n#endif\nbaseColor*=baseTextureColor;\n#endif\n#ifdef RENDERER_HAS_VERTEXCOLOR\nbaseColor*=v_color;\n#endif\n#ifdef MATERIAL_IS_ALPHA_CUTOFF\nif(baseColor.a<alphaCutoff){discard;}\n#endif\n#ifdef MATERIAL_HAS_ROUGHNESS_METALLIC_TEXTURE\nvec4 metalRoughMapColor=texture2D(material_RoughnessMetallicTexture,v_uv);roughness*=metalRoughMapColor.g;metal*=metalRoughMapColor.b;\n#endif\n#ifdef MATERIAL_HAS_SPECULAR_GLOSSINESS_TEXTURE\nvec4 specularGlossinessColor=texture2D(material_SpecularGlossinessTexture,v_uv);\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\nspecularGlossinessColor=gammaToLinear(specularGlossinessColor);\n#endif\nspecularColor*=specularGlossinessColor.rgb;glossiness*=specularGlossinessColor.a;\n#endif\n#ifdef IS_METALLIC_WORKFLOW\nmaterial.diffuseColor=baseColor.rgb*(1.0-metal);material.specularColor=mix(vec3(0.04),baseColor.rgb,metal);material.roughness=roughness;\n#else\nfloat specularStrength=max(max(specularColor.r,specularColor.g),specularColor.b);material.diffuseColor=baseColor.rgb*(1.0-specularStrength);material.specularColor=specularColor;material.roughness=1.0-glossiness;\n#endif\nmaterial.roughness=max(material.roughness,getAARoughnessFactor(geometry.normal));\n#ifdef MATERIAL_ENABLE_CLEAR_COAT\nmaterial.clearCoat=material_ClearCoat;material.clearCoatRoughness=material_ClearCoatRoughness;\n#ifdef MATERIAL_HAS_CLEAR_COAT_TEXTURE\nmaterial.clearCoat*=texture2D(material_ClearCoatTexture,v_uv).r;\n#endif\n#ifdef MATERIAL_HAS_CLEAR_COAT_ROUGHNESS_TEXTURE\nmaterial.clearCoatRoughness*=texture2D(material_ClearCoatRoughnessTexture,v_uv).g;\n#endif\nmaterial.clearCoat=saturate(material.clearCoat);material.clearCoatRoughness=max(material.clearCoatRoughness,getAARoughnessFactor(geometry.clearCoatNormal));\n#endif\n#ifdef MATERIAL_IS_TRANSPARENT\nmaterial.opacity=baseColor.a;\n#else\nmaterial.opacity=1.0;\n#endif\n}\n#include <brdf>\n#include <direct_irradiance_frag_define>\n#include <ibl_frag_define>\n"; // eslint-disable-line
9631
9583
 
9632
9584
  var brdf = "#define GLSLIFY 1\nfloat F_Schlick(float dotLH){return 0.04+0.96*(pow(1.0-dotLH,5.0));}vec3 F_Schlick(vec3 specularColor,float dotLH){float fresnel=exp2((-5.55473*dotLH-6.98316)*dotLH);return(1.0-specularColor)*fresnel+specularColor;}float G_GGX_SmithCorrelated(float alpha,float dotNL,float dotNV){float a2=pow2(alpha);float gv=dotNL*sqrt(a2+(1.0-a2)*pow2(dotNV));float gl=dotNV*sqrt(a2+(1.0-a2)*pow2(dotNL));return 0.5/max(gv+gl,EPSILON);}float D_GGX(float alpha,float dotNH){float a2=pow2(alpha);float denom=pow2(dotNH)*(a2-1.0)+1.0;return RECIPROCAL_PI*a2/pow2(denom);}vec3 BRDF_Specular_GGX(vec3 incidentDirection,vec3 viewDir,vec3 normal,vec3 specularColor,float roughness){float alpha=pow2(roughness);vec3 halfDir=normalize(incidentDirection+viewDir);float dotNL=saturate(dot(normal,incidentDirection));float dotNV=saturate(dot(normal,viewDir));float dotNH=saturate(dot(normal,halfDir));float dotLH=saturate(dot(incidentDirection,halfDir));vec3 F=F_Schlick(specularColor,dotLH);float G=G_GGX_SmithCorrelated(alpha,dotNL,dotNV);float D=D_GGX(alpha,dotNH);return F*(G*D);}vec3 BRDF_Diffuse_Lambert(vec3 diffuseColor){return RECIPROCAL_PI*diffuseColor;}"; // eslint-disable-line
9633
9585
 
9634
- var direct_irradiance_frag_define = "#define GLSLIFY 1\n#include <ShadowFragmentDeclaration>\nvoid addDirectRadiance(vec3 incidentDirection,vec3 color,Geometry geometry,Material material,inout ReflectedLight reflectedLight){float attenuation=1.0;\n#ifdef MATERIAL_CLEARCOAT\nfloat clearCoatDotNL=saturate(dot(geometry.clearCoatNormal,incidentDirection));vec3 clearCoatIrradiance=clearCoatDotNL*color;reflectedLight.directSpecular+=material.clearCoat*clearCoatIrradiance*BRDF_Specular_GGX(incidentDirection,geometry.viewDir,geometry.clearCoatNormal,vec3(0.04),material.clearCoatRoughness);attenuation-=material.clearCoat*F_Schlick(geometry.clearCoatDotNV);\n#endif\nfloat dotNL=saturate(dot(geometry.normal,incidentDirection));vec3 irradiance=dotNL*color*PI;reflectedLight.directSpecular+=attenuation*irradiance*BRDF_Specular_GGX(incidentDirection,geometry.viewDir,geometry.normal,material.specularColor,material.roughness);reflectedLight.directDiffuse+=attenuation*irradiance*BRDF_Diffuse_Lambert(material.diffuseColor);}\n#ifdef SCENE_DIRECT_LIGHT_COUNT\nvoid addDirectionalDirectLightRadiance(DirectLight directionalLight,Geometry geometry,Material material,inout ReflectedLight reflectedLight){vec3 color=directionalLight.color;vec3 direction=-directionalLight.direction;addDirectRadiance(direction,color,geometry,material,reflectedLight);}\n#endif\n#ifdef SCENE_POINT_LIGHT_COUNT\nvoid addPointDirectLightRadiance(PointLight pointLight,Geometry geometry,Material material,inout ReflectedLight reflectedLight){vec3 lVector=pointLight.position-geometry.position;vec3 direction=normalize(lVector);float lightDistance=length(lVector);vec3 color=pointLight.color;color*=clamp(1.0-pow(lightDistance/pointLight.distance,4.0),0.0,1.0);addDirectRadiance(direction,color,geometry,material,reflectedLight);}\n#endif\n#ifdef SCENE_SPOT_LIGHT_COUNT\nvoid addSpotDirectLightRadiance(SpotLight spotLight,Geometry geometry,Material material,inout ReflectedLight reflectedLight){vec3 lVector=spotLight.position-geometry.position;vec3 direction=normalize(lVector);float lightDistance=length(lVector);float angleCos=dot(direction,-spotLight.direction);float spotEffect=smoothstep(spotLight.penumbraCos,spotLight.angleCos,angleCos);float decayEffect=clamp(1.0-pow(lightDistance/spotLight.distance,4.0),0.0,1.0);vec3 color=spotLight.color;color*=spotEffect*decayEffect;addDirectRadiance(direction,color,geometry,material,reflectedLight);}\n#endif\nvoid addTotalDirectRadiance(Geometry geometry,Material material,inout ReflectedLight reflectedLight){float shadowAttenuation=1.0;\n#ifdef SCENE_DIRECT_LIGHT_COUNT\nshadowAttenuation=1.0;\n#ifdef SCENE_IS_CALCULATE_SHADOWS\nshadowAttenuation*=sampleShadowMap();int sunIndex=int(scene_ShadowInfo.z);\n#endif\nDirectLight directionalLight;for(int i=0;i<SCENE_DIRECT_LIGHT_COUNT;i++){if(isRendererCulledByLight(renderer_Layer.xy,scene_DirectLightCullingMask[i]))continue;directionalLight.color=scene_DirectLightColor[i];\n#ifdef SCENE_IS_CALCULATE_SHADOWS\nif(i==sunIndex){directionalLight.color*=shadowAttenuation;}\n#endif\ndirectionalLight.direction=scene_DirectLightDirection[i];addDirectionalDirectLightRadiance(directionalLight,geometry,material,reflectedLight);}\n#endif\n#ifdef SCENE_POINT_LIGHT_COUNT\nPointLight pointLight;for(int i=0;i<SCENE_POINT_LIGHT_COUNT;i++){if(isRendererCulledByLight(renderer_Layer.xy,scene_PointLightCullingMask[i]))continue;pointLight.color=scene_PointLightColor[i];pointLight.position=scene_PointLightPosition[i];pointLight.distance=scene_PointLightDistance[i];addPointDirectLightRadiance(pointLight,geometry,material,reflectedLight);}\n#endif\n#ifdef SCENE_SPOT_LIGHT_COUNT\nSpotLight spotLight;for(int i=0;i<SCENE_SPOT_LIGHT_COUNT;i++){if(isRendererCulledByLight(renderer_Layer.xy,scene_SpotLightCullingMask[i]))continue;spotLight.color=scene_SpotLightColor[i];spotLight.position=scene_SpotLightPosition[i];spotLight.direction=scene_SpotLightDirection[i];spotLight.distance=scene_SpotLightDistance[i];spotLight.angleCos=scene_SpotLightAngleCos[i];spotLight.penumbraCos=scene_SpotLightPenumbraCos[i];addSpotDirectLightRadiance(spotLight,geometry,material,reflectedLight);}\n#endif\n}"; // eslint-disable-line
9586
+ var direct_irradiance_frag_define = "#define GLSLIFY 1\n#include <ShadowFragmentDeclaration>\nvoid addDirectRadiance(vec3 incidentDirection,vec3 color,Geometry geometry,Material material,inout ReflectedLight reflectedLight){float attenuation=1.0;\n#ifdef MATERIAL_ENABLE_CLEAR_COAT\nfloat clearCoatDotNL=saturate(dot(geometry.clearCoatNormal,incidentDirection));vec3 clearCoatIrradiance=clearCoatDotNL*color;reflectedLight.directSpecular+=material.clearCoat*clearCoatIrradiance*BRDF_Specular_GGX(incidentDirection,geometry.viewDir,geometry.clearCoatNormal,vec3(0.04),material.clearCoatRoughness);attenuation-=material.clearCoat*F_Schlick(geometry.clearCoatDotNV);\n#endif\nfloat dotNL=saturate(dot(geometry.normal,incidentDirection));vec3 irradiance=dotNL*color*PI;reflectedLight.directSpecular+=attenuation*irradiance*BRDF_Specular_GGX(incidentDirection,geometry.viewDir,geometry.normal,material.specularColor,material.roughness);reflectedLight.directDiffuse+=attenuation*irradiance*BRDF_Diffuse_Lambert(material.diffuseColor);}\n#ifdef SCENE_DIRECT_LIGHT_COUNT\nvoid addDirectionalDirectLightRadiance(DirectLight directionalLight,Geometry geometry,Material material,inout ReflectedLight reflectedLight){vec3 color=directionalLight.color;vec3 direction=-directionalLight.direction;addDirectRadiance(direction,color,geometry,material,reflectedLight);}\n#endif\n#ifdef SCENE_POINT_LIGHT_COUNT\nvoid addPointDirectLightRadiance(PointLight pointLight,Geometry geometry,Material material,inout ReflectedLight reflectedLight){vec3 lVector=pointLight.position-geometry.position;vec3 direction=normalize(lVector);float lightDistance=length(lVector);vec3 color=pointLight.color;color*=clamp(1.0-pow(lightDistance/pointLight.distance,4.0),0.0,1.0);addDirectRadiance(direction,color,geometry,material,reflectedLight);}\n#endif\n#ifdef SCENE_SPOT_LIGHT_COUNT\nvoid addSpotDirectLightRadiance(SpotLight spotLight,Geometry geometry,Material material,inout ReflectedLight reflectedLight){vec3 lVector=spotLight.position-geometry.position;vec3 direction=normalize(lVector);float lightDistance=length(lVector);float angleCos=dot(direction,-spotLight.direction);float spotEffect=smoothstep(spotLight.penumbraCos,spotLight.angleCos,angleCos);float decayEffect=clamp(1.0-pow(lightDistance/spotLight.distance,4.0),0.0,1.0);vec3 color=spotLight.color;color*=spotEffect*decayEffect;addDirectRadiance(direction,color,geometry,material,reflectedLight);}\n#endif\nvoid addTotalDirectRadiance(Geometry geometry,Material material,inout ReflectedLight reflectedLight){float shadowAttenuation=1.0;\n#ifdef SCENE_DIRECT_LIGHT_COUNT\nshadowAttenuation=1.0;\n#ifdef SCENE_IS_CALCULATE_SHADOWS\nshadowAttenuation*=sampleShadowMap();int sunIndex=int(scene_ShadowInfo.z);\n#endif\nDirectLight directionalLight;for(int i=0;i<SCENE_DIRECT_LIGHT_COUNT;i++){if(isRendererCulledByLight(renderer_Layer.xy,scene_DirectLightCullingMask[i]))continue;directionalLight.color=scene_DirectLightColor[i];\n#ifdef SCENE_IS_CALCULATE_SHADOWS\nif(i==sunIndex){directionalLight.color*=shadowAttenuation;}\n#endif\ndirectionalLight.direction=scene_DirectLightDirection[i];addDirectionalDirectLightRadiance(directionalLight,geometry,material,reflectedLight);}\n#endif\n#ifdef SCENE_POINT_LIGHT_COUNT\nPointLight pointLight;for(int i=0;i<SCENE_POINT_LIGHT_COUNT;i++){if(isRendererCulledByLight(renderer_Layer.xy,scene_PointLightCullingMask[i]))continue;pointLight.color=scene_PointLightColor[i];pointLight.position=scene_PointLightPosition[i];pointLight.distance=scene_PointLightDistance[i];addPointDirectLightRadiance(pointLight,geometry,material,reflectedLight);}\n#endif\n#ifdef SCENE_SPOT_LIGHT_COUNT\nSpotLight spotLight;for(int i=0;i<SCENE_SPOT_LIGHT_COUNT;i++){if(isRendererCulledByLight(renderer_Layer.xy,scene_SpotLightCullingMask[i]))continue;spotLight.color=scene_SpotLightColor[i];spotLight.position=scene_SpotLightPosition[i];spotLight.direction=scene_SpotLightDirection[i];spotLight.distance=scene_SpotLightDistance[i];spotLight.angleCos=scene_SpotLightAngleCos[i];spotLight.penumbraCos=scene_SpotLightPenumbraCos[i];addSpotDirectLightRadiance(spotLight,geometry,material,reflectedLight);}\n#endif\n}"; // eslint-disable-line
9635
9587
 
9636
9588
  var ibl_frag_define = "#define GLSLIFY 1\nvec3 getLightProbeIrradiance(vec3 sh[9],vec3 normal){normal.x=-normal.x;vec3 result=sh[0]+sh[1]*(normal.y)+sh[2]*(normal.z)+sh[3]*(normal.x)+sh[4]*(normal.y*normal.x)+sh[5]*(normal.y*normal.z)+sh[6]*(3.0*normal.z*normal.z-1.0)+sh[7]*(normal.z*normal.x)+sh[8]*(normal.x*normal.x-normal.y*normal.y);return max(result,vec3(0.0));}vec3 envBRDFApprox(vec3 specularColor,float roughness,float dotNV){const vec4 c0=vec4(-1,-0.0275,-0.572,0.022);const vec4 c1=vec4(1,0.0425,1.04,-0.04);vec4 r=roughness*c0+c1;float a004=min(r.x*r.x,exp2(-9.28*dotNV))*r.x+r.y;vec2 AB=vec2(-1.04,1.04)*a004+r.zw;return specularColor*AB.x+AB.y;}float getSpecularMIPLevel(float roughness,int maxMIPLevel){return roughness*float(maxMIPLevel);}vec3 getLightProbeRadiance(vec3 viewDir,vec3 normal,float roughness,int maxMIPLevel,float specularIntensity){\n#ifndef SCENE_USE_SPECULAR_ENV\nreturn vec3(0);\n#else\nvec3 reflectVec=reflect(-viewDir,normal);reflectVec.x=-reflectVec.x;float specularMIPLevel=getSpecularMIPLevel(roughness,maxMIPLevel);\n#ifdef HAS_TEX_LOD\nvec4 envMapColor=textureCubeLodEXT(scene_EnvSpecularSampler,reflectVec,specularMIPLevel);\n#else\nvec4 envMapColor=textureCube(scene_EnvSpecularSampler,reflectVec,specularMIPLevel);\n#endif\n#ifdef SCENE_IS_DECODE_ENV_RGBM\nenvMapColor.rgb=RGBMToLinear(envMapColor,5.0).rgb;\n#ifdef ENGINE_IS_COLORSPACE_GAMMA\nenvMapColor=linearToGamma(envMapColor);\n#endif\n#else\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\nenvMapColor=gammaToLinear(envMapColor);\n#endif\n#endif\nreturn envMapColor.rgb*specularIntensity;\n#endif\n}"; // eslint-disable-line
9637
9589
 
9638
- var pbr_frag = "#define GLSLIFY 1\nGeometry geometry;Material material;ReflectedLight reflectedLight=ReflectedLight(vec3(0.0),vec3(0.0),vec3(0.0),vec3(0.0));initGeometry(geometry);initMaterial(material,geometry);addTotalDirectRadiance(geometry,material,reflectedLight);\n#ifdef SCENE_USE_SH\nvec3 irradiance=getLightProbeIrradiance(scene_EnvSH,geometry.normal);\n#ifdef ENGINE_IS_COLORSPACE_GAMMA\nirradiance=linearToGamma(vec4(irradiance,1.0)).rgb;\n#endif\nirradiance*=scene_EnvMapLight.diffuseIntensity;\n#else\nvec3 irradiance=scene_EnvMapLight.diffuse*scene_EnvMapLight.diffuseIntensity;irradiance*=PI;\n#endif\nreflectedLight.indirectDiffuse+=irradiance*BRDF_Diffuse_Lambert(material.diffuseColor);vec3 radiance=getLightProbeRadiance(geometry.viewDir,geometry.normal,material.roughness,int(scene_EnvMapLight.mipMapLevel),scene_EnvMapLight.specularIntensity);float radianceAttenuation=1.0;\n#ifdef MATERIAL_CLEARCOAT\nvec3 clearCoatRadiance=getLightProbeRadiance(geometry.viewDir,geometry.clearCoatNormal,material.clearCoatRoughness,int(scene_EnvMapLight.mipMapLevel),scene_EnvMapLight.specularIntensity);reflectedLight.indirectSpecular+=clearCoatRadiance*material.clearCoat*envBRDFApprox(vec3(0.04),material.clearCoatRoughness,geometry.clearCoatDotNV);radianceAttenuation-=material.clearCoat*F_Schlick(geometry.clearCoatDotNV);\n#endif\nreflectedLight.indirectSpecular+=radianceAttenuation*radiance*envBRDFApprox(material.specularColor,material.roughness,geometry.dotNV);\n#ifdef MATERIAL_OCCLUSIONTEXTURE\nvec2 aoUV=v_uv;\n#ifdef RENDERER_HAS_UV1\nif(material_OcclusionTextureCoord==1.0){aoUV=v_uv1;}\n#endif\nfloat ambientOcclusion=(texture2D(material_OcclusionTexture,aoUV).r-1.0)*material_OcclusionIntensity+1.0;reflectedLight.indirectDiffuse*=ambientOcclusion;\n#ifdef SCENE_USE_SPECULAR_ENV\nreflectedLight.indirectSpecular*=computeSpecularOcclusion(ambientOcclusion,material.roughness,geometry.dotNV);\n#endif\n#endif\nvec3 emissiveRadiance=material_EmissiveColor;\n#ifdef MATERIAL_HAS_EMISSIVETEXTURE\nvec4 emissiveColor=texture2D(material_EmissiveTexture,v_uv);\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\nemissiveColor=gammaToLinear(emissiveColor);\n#endif\nemissiveRadiance*=emissiveColor.rgb;\n#endif\nvec3 totalRadiance=reflectedLight.directDiffuse+reflectedLight.indirectDiffuse+reflectedLight.directSpecular+reflectedLight.indirectSpecular+emissiveRadiance;vec4 targetColor=vec4(totalRadiance,material.opacity);gl_FragColor=targetColor;"; // eslint-disable-line
9590
+ var pbr_frag = "#define GLSLIFY 1\nGeometry geometry;Material material;ReflectedLight reflectedLight=ReflectedLight(vec3(0.0),vec3(0.0),vec3(0.0),vec3(0.0));initGeometry(geometry);initMaterial(material,geometry);addTotalDirectRadiance(geometry,material,reflectedLight);\n#ifdef SCENE_USE_SH\nvec3 irradiance=getLightProbeIrradiance(scene_EnvSH,geometry.normal);\n#ifdef ENGINE_IS_COLORSPACE_GAMMA\nirradiance=linearToGamma(vec4(irradiance,1.0)).rgb;\n#endif\nirradiance*=scene_EnvMapLight.diffuseIntensity;\n#else\nvec3 irradiance=scene_EnvMapLight.diffuse*scene_EnvMapLight.diffuseIntensity;irradiance*=PI;\n#endif\nreflectedLight.indirectDiffuse+=irradiance*BRDF_Diffuse_Lambert(material.diffuseColor);vec3 radiance=getLightProbeRadiance(geometry.viewDir,geometry.normal,material.roughness,int(scene_EnvMapLight.mipMapLevel),scene_EnvMapLight.specularIntensity);float radianceAttenuation=1.0;\n#ifdef MATERIAL_ENABLE_CLEAR_COAT\nvec3 clearCoatRadiance=getLightProbeRadiance(geometry.viewDir,geometry.clearCoatNormal,material.clearCoatRoughness,int(scene_EnvMapLight.mipMapLevel),scene_EnvMapLight.specularIntensity);reflectedLight.indirectSpecular+=clearCoatRadiance*material.clearCoat*envBRDFApprox(vec3(0.04),material.clearCoatRoughness,geometry.clearCoatDotNV);radianceAttenuation-=material.clearCoat*F_Schlick(geometry.clearCoatDotNV);\n#endif\nreflectedLight.indirectSpecular+=radianceAttenuation*radiance*envBRDFApprox(material.specularColor,material.roughness,geometry.dotNV);\n#ifdef MATERIAL_HAS_OCCLUSION_TEXTURE\nvec2 aoUV=v_uv;\n#ifdef RENDERER_HAS_UV1\nif(material_OcclusionTextureCoord==1.0){aoUV=v_uv1;}\n#endif\nfloat ambientOcclusion=(texture2D(material_OcclusionTexture,aoUV).r-1.0)*material_OcclusionIntensity+1.0;reflectedLight.indirectDiffuse*=ambientOcclusion;\n#ifdef SCENE_USE_SPECULAR_ENV\nreflectedLight.indirectSpecular*=computeSpecularOcclusion(ambientOcclusion,material.roughness,geometry.dotNV);\n#endif\n#endif\nvec3 emissiveRadiance=material_EmissiveColor;\n#ifdef MATERIAL_HAS_EMISSIVETEXTURE\nvec4 emissiveColor=texture2D(material_EmissiveTexture,v_uv);\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\nemissiveColor=gammaToLinear(emissiveColor);\n#endif\nemissiveRadiance*=emissiveColor.rgb;\n#endif\nvec3 totalRadiance=reflectedLight.directDiffuse+reflectedLight.indirectDiffuse+reflectedLight.directSpecular+reflectedLight.indirectSpecular+emissiveRadiance;vec4 targetColor=vec4(totalRadiance,material.opacity);gl_FragColor=targetColor;"; // eslint-disable-line
9639
9591
 
9640
9592
  var PBRShaderLib = {
9641
9593
  pbr_frag_define: pbr_frag_define,
@@ -9664,7 +9616,7 @@ var ShadowLib = {
9664
9616
  ShadowVertex: ShadowVertex
9665
9617
  };
9666
9618
 
9667
- var normal_get = "#define GLSLIFY 1\nvec3 getNormal(){\n#ifdef RENDERER_HAS_NORMAL\nvec3 normal=normalize(v_normal);\n#elif defined(HAS_DERIVATIVES)\nvec3 pos_dx=dFdx(v_pos);vec3 pos_dy=dFdy(v_pos);vec3 normal=normalize(cross(pos_dx,pos_dy));\n#else\nvec3 normal=vec3(0,0,1);\n#endif\nnormal*=float(gl_FrontFacing)*2.0-1.0;return normal;}vec3 getNormalByNormalTexture(mat3 tbn,sampler2D normalTexture,float normalIntensity,vec2 uv){vec3 normal=texture2D(normalTexture,uv).rgb;normal=normalize(tbn*((2.0*normal-1.0)*vec3(normalIntensity,normalIntensity,1.0)));normal*=float(gl_FrontFacing)*2.0-1.0;return normal;}mat3 getTBN(){\n#if defined(RENDERER_HAS_NORMAL) && defined(RENDERER_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEARCOATNORMALTEXTURE) )\nmat3 tbn=v_TBN;\n#else\nvec3 normal=getNormal();vec3 position=v_pos;vec2 uv=gl_FrontFacing? v_uv:-v_uv;\n#ifdef HAS_DERIVATIVES\nvec3 dp1=dFdx(position);vec3 dp2=dFdy(position);vec2 duv1=dFdx(uv);vec2 duv2=dFdy(uv);vec3 dp2perp=cross(dp2,normal);vec3 dp1perp=cross(normal,dp1);vec3 tangent=dp2perp*duv1.x+dp1perp*duv2.x;vec3 binormal=dp2perp*duv1.y+dp1perp*duv2.y;float invmax=inversesqrt(max(dot(tangent,tangent),dot(binormal,binormal)));mat3 tbn=mat3(tangent*invmax,binormal*invmax,normal);\n#else\nmat3 tbn=mat3(vec3(0.0),vec3(0.0),normal);\n#endif\n#endif\nreturn tbn;}"; // eslint-disable-line
9619
+ var normal_get = "#define GLSLIFY 1\nvec3 getNormal(){\n#ifdef RENDERER_HAS_NORMAL\nvec3 normal=normalize(v_normal);\n#elif defined(HAS_DERIVATIVES)\nvec3 pos_dx=dFdx(v_pos);vec3 pos_dy=dFdy(v_pos);vec3 normal=normalize(cross(pos_dx,pos_dy));\n#else\nvec3 normal=vec3(0,0,1);\n#endif\nnormal*=float(gl_FrontFacing)*2.0-1.0;return normal;}vec3 getNormalByNormalTexture(mat3 tbn,sampler2D normalTexture,float normalIntensity,vec2 uv){vec3 normal=texture2D(normalTexture,uv).rgb;normal=normalize(tbn*((2.0*normal-1.0)*vec3(normalIntensity,normalIntensity,1.0)));normal*=float(gl_FrontFacing)*2.0-1.0;return normal;}mat3 getTBN(){\n#if defined(RENDERER_HAS_NORMAL) && defined(RENDERER_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE) )\nmat3 tbn=v_TBN;\n#else\nvec3 normal=getNormal();vec3 position=v_pos;vec2 uv=gl_FrontFacing? v_uv:-v_uv;\n#ifdef HAS_DERIVATIVES\nvec3 dp1=dFdx(position);vec3 dp2=dFdy(position);vec2 duv1=dFdx(uv);vec2 duv2=dFdy(uv);vec3 dp2perp=cross(dp2,normal);vec3 dp1perp=cross(normal,dp1);vec3 tangent=dp2perp*duv1.x+dp1perp*duv2.x;vec3 binormal=dp2perp*duv1.y+dp1perp*duv2.y;float invmax=inversesqrt(max(dot(tangent,tangent),dot(binormal,binormal)));mat3 tbn=mat3(tangent*invmax,binormal*invmax,normal);\n#else\nmat3 tbn=mat3(vec3(0.0),vec3(0.0),normal);\n#endif\n#endif\nreturn tbn;}"; // eslint-disable-line
9668
9620
 
9669
9621
  var ShaderLib = _extends({
9670
9622
  common: common,
@@ -10779,7 +10731,6 @@ var Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10779
10731
  };
10780
10732
  _proto.update = function update(deltaTime) {};
10781
10733
  /**
10782
- * @override
10783
10734
  * @internal
10784
10735
  */ _proto._onEnable = function _onEnable() {
10785
10736
  var componentsManager = this.engine._componentsManager;
@@ -10789,7 +10740,6 @@ var Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10789
10740
  componentsManager.addRenderer(this);
10790
10741
  };
10791
10742
  /**
10792
- * @override
10793
10743
  * @internal
10794
10744
  */ _proto._onDisable = function _onDisable() {
10795
10745
  var componentsManager = this.engine._componentsManager;
@@ -10816,7 +10766,6 @@ var Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10816
10766
  ShaderMacroCollection.unionCollection(context.camera._globalShaderMacro, this.shaderData._macroCollection, this._globalShaderMacro);
10817
10767
  };
10818
10768
  /**
10819
- * @override
10820
10769
  * @internal
10821
10770
  */ _proto._onDestroy = function _onDestroy() {
10822
10771
  Component.prototype._onDestroy.call(this);
@@ -11209,9 +11158,7 @@ SimpleSpriteAssembler = __decorate([
11209
11158
  */ _proto._cloneTo = function _cloneTo(target) {
11210
11159
  target.sprite = this._sprite;
11211
11160
  };
11212
- /**
11213
- * @override
11214
- */ _proto._updateBounds = function _updateBounds(worldBounds) {
11161
+ _proto._updateBounds = function _updateBounds(worldBounds) {
11215
11162
  var _this_sprite;
11216
11163
  if (!((_this_sprite = this.sprite) == null ? void 0 : _this_sprite.texture) || !this.width || !this.height) {
11217
11164
  worldBounds.min.set(0, 0, 0);
@@ -11221,7 +11168,6 @@ SimpleSpriteAssembler = __decorate([
11221
11168
  }
11222
11169
  };
11223
11170
  /**
11224
- * @override
11225
11171
  * @inheritdoc
11226
11172
  */ _proto._render = function _render(context) {
11227
11173
  var _this_sprite;
@@ -11247,7 +11193,6 @@ SimpleSpriteAssembler = __decorate([
11247
11193
  this._maskElement = renderElement;
11248
11194
  };
11249
11195
  /**
11250
- * @override
11251
11196
  * @inheritdoc
11252
11197
  */ _proto._onDestroy = function _onDestroy() {
11253
11198
  var _this__sprite;
@@ -11668,16 +11613,11 @@ var BufferUtil = /*#__PURE__*/ function() {
11668
11613
  if (dataOffset === void 0) dataOffset = 0;
11669
11614
  this._platformBuffer.getData(data, bufferByteOffset, dataOffset, dataLength);
11670
11615
  };
11671
- /**
11672
- * @override
11673
- */ _proto._rebuild = function _rebuild() {
11616
+ _proto._rebuild = function _rebuild() {
11674
11617
  var platformBuffer = this._engine._hardwareRenderer.createPlatformBuffer(this._type, this._byteLength, this._bufferUsage);
11675
11618
  this._platformBuffer = platformBuffer;
11676
11619
  };
11677
- /**
11678
- * @override
11679
- * @internal
11680
- */ _proto._onDestroy = function _onDestroy() {
11620
+ _proto._onDestroy = function _onDestroy() {
11681
11621
  GraphicsResource.prototype._onDestroy.call(this);
11682
11622
  this._platformBuffer.destroy();
11683
11623
  };
@@ -11870,22 +11810,17 @@ var BufferUtil = /*#__PURE__*/ function() {
11870
11810
  this._platformPrimitive.draw(shaderProgram, subMesh);
11871
11811
  this._bufferStructChanged = false;
11872
11812
  };
11873
- /**
11874
- * @override
11875
- */ _proto._addReferCount = function _addReferCount(value) {
11813
+ _proto._addReferCount = function _addReferCount(value) {
11876
11814
  GraphicsResource.prototype._addReferCount.call(this, value);
11877
11815
  var vertexBufferBindings = this._vertexBufferBindings;
11878
11816
  for(var i = 0, n = vertexBufferBindings.length; i < n; i++){
11879
11817
  vertexBufferBindings[i]._buffer._addReferCount(value);
11880
11818
  }
11881
11819
  };
11882
- /**
11883
- * @override
11884
- */ _proto._rebuild = function _rebuild() {
11820
+ _proto._rebuild = function _rebuild() {
11885
11821
  this._engine._hardwareRenderer.createPlatformPrimitive(this);
11886
11822
  };
11887
11823
  /**
11888
- * @override
11889
11824
  * @internal
11890
11825
  */ _proto._onDestroy = function _onDestroy() {
11891
11826
  GraphicsResource.prototype._onDestroy.call(this);
@@ -13039,10 +12974,7 @@ var MeshModifyFlags;
13039
12974
  }
13040
12975
  this.setTangents(tangents);
13041
12976
  };
13042
- /**
13043
- * @override
13044
- * @internal
13045
- */ _proto._onDestroy = function _onDestroy() {
12977
+ _proto._onDestroy = function _onDestroy() {
13046
12978
  Mesh.prototype._onDestroy.call(this);
13047
12979
  this._readable && this._releaseCache();
13048
12980
  };
@@ -13517,10 +13449,7 @@ var VertexChangedFlags;
13517
13449
  return _this;
13518
13450
  }
13519
13451
  var _proto = MeshRenderer.prototype;
13520
- /**
13521
- * @internal
13522
- * @override
13523
- */ _proto._onDestroy = function _onDestroy() {
13452
+ _proto._onDestroy = function _onDestroy() {
13524
13453
  Renderer.prototype._onDestroy.call(this);
13525
13454
  var mesh = this._mesh;
13526
13455
  if (mesh && !mesh.destroyed) {
@@ -13533,9 +13462,7 @@ var VertexChangedFlags;
13533
13462
  */ _proto._cloneTo = function _cloneTo(target) {
13534
13463
  target.mesh = this._mesh;
13535
13464
  };
13536
- /**
13537
- * @override
13538
- */ _proto._updateBounds = function _updateBounds(worldBounds) {
13465
+ _proto._updateBounds = function _updateBounds(worldBounds) {
13539
13466
  var mesh = this._mesh;
13540
13467
  if (mesh) {
13541
13468
  var localBounds = mesh.bounds;
@@ -13546,9 +13473,7 @@ var VertexChangedFlags;
13546
13473
  worldBounds.max.set(0, 0, 0);
13547
13474
  }
13548
13475
  };
13549
- /**
13550
- * @override
13551
- */ _proto._render = function _render(context) {
13476
+ _proto._render = function _render(context) {
13552
13477
  var mesh = this._mesh;
13553
13478
  if (mesh) {
13554
13479
  if (this._dirtyUpdateFlag & 0x2) {
@@ -13709,9 +13634,7 @@ var /**
13709
13634
  }
13710
13635
  }
13711
13636
  };
13712
- /**
13713
- * @override
13714
- */ _proto._updateShaderData = function _updateShaderData(context) {
13637
+ _proto._updateShaderData = function _updateShaderData(context) {
13715
13638
  var entity = this.entity;
13716
13639
  var worldMatrix = this._rootBone ? this._rootBone.transform.worldMatrix : entity.transform.worldMatrix;
13717
13640
  this._updateTransformShaderData(context, worldMatrix);
@@ -13766,14 +13689,10 @@ var /**
13766
13689
  MeshRenderer.prototype._cloneTo.call(this, target);
13767
13690
  this._blendShapeWeights && (target._blendShapeWeights = this._blendShapeWeights.slice());
13768
13691
  };
13769
- /**
13770
- * @override
13771
- */ _proto._registerEntityTransformListener = function _registerEntityTransformListener() {
13692
+ _proto._registerEntityTransformListener = function _registerEntityTransformListener() {
13772
13693
  // Cancel register listener to entity transform.
13773
13694
  };
13774
- /**
13775
- * @override
13776
- */ _proto._updateBounds = function _updateBounds(worldBounds) {
13695
+ _proto._updateBounds = function _updateBounds(worldBounds) {
13777
13696
  if (this._rootBone) {
13778
13697
  var localBounds = this._localBounds;
13779
13698
  var worldMatrix = this._rootBone.transform.worldMatrix;
@@ -13993,9 +13912,7 @@ __decorate([
13993
13912
  return _this;
13994
13913
  }
13995
13914
  var _proto = PrimitiveMeshRestorer.prototype;
13996
- /**
13997
- * @override
13998
- */ _proto.restoreContent = function restoreContent() {
13915
+ _proto.restoreContent = function restoreContent() {
13999
13916
  var primitiveInfo = this.primitiveInfo;
14000
13917
  switch(primitiveInfo.type){
14001
13918
  case 0:
@@ -14055,7 +13972,6 @@ var PrimitiveType;
14055
13972
  _this = PrimitiveRestoreInfo.call(this, 0, noLongerAccessible) || this;
14056
13973
  _this.radius = radius;
14057
13974
  _this.segments = segments;
14058
- _this.noLongerAccessible = noLongerAccessible;
14059
13975
  return _this;
14060
13976
  }
14061
13977
  return SphereRestoreInfo;
@@ -14070,7 +13986,6 @@ var PrimitiveType;
14070
13986
  _this.width = width;
14071
13987
  _this.height = height;
14072
13988
  _this.depth = depth;
14073
- _this.noLongerAccessible = noLongerAccessible;
14074
13989
  return _this;
14075
13990
  }
14076
13991
  return CuboidRestoreInfo;
@@ -14086,7 +14001,6 @@ var PrimitiveType;
14086
14001
  _this.height = height;
14087
14002
  _this.horizontalSegments = horizontalSegments;
14088
14003
  _this.verticalSegments = verticalSegments;
14089
- _this.noLongerAccessible = noLongerAccessible;
14090
14004
  return _this;
14091
14005
  }
14092
14006
  return PlaneRestoreInfo;
@@ -14103,7 +14017,6 @@ var PrimitiveType;
14103
14017
  _this.height = height;
14104
14018
  _this.radialSegments = radialSegments;
14105
14019
  _this.heightSegments = heightSegments;
14106
- _this.noLongerAccessible = noLongerAccessible;
14107
14020
  return _this;
14108
14021
  }
14109
14022
  return CylinderRestoreInfo;
@@ -14120,7 +14033,6 @@ var PrimitiveType;
14120
14033
  _this.radialSegments = radialSegments;
14121
14034
  _this.tubularSegments = tubularSegments;
14122
14035
  _this.arc = arc;
14123
- _this.noLongerAccessible = noLongerAccessible;
14124
14036
  return _this;
14125
14037
  }
14126
14038
  return TorusRestoreInfo;
@@ -14136,7 +14048,6 @@ var PrimitiveType;
14136
14048
  _this.height = height;
14137
14049
  _this.radialSegments = radialSegments;
14138
14050
  _this.heightSegments = heightSegments;
14139
- _this.noLongerAccessible = noLongerAccessible;
14140
14051
  return _this;
14141
14052
  }
14142
14053
  return ConeRestoreInfo;
@@ -14152,7 +14063,6 @@ var PrimitiveType;
14152
14063
  _this.height = height;
14153
14064
  _this.radialSegments = radialSegments;
14154
14065
  _this.heightSegments = heightSegments;
14155
- _this.noLongerAccessible = noLongerAccessible;
14156
14066
  return _this;
14157
14067
  }
14158
14068
  return CapsuleRestoreInfo;
@@ -17146,14 +17056,12 @@ ShaderPool.init();
17146
17056
  /**
17147
17057
  * @internal
17148
17058
  * @inheritDoc
17149
- * @override
17150
17059
  */ _proto._onAwake = function _onAwake() {
17151
17060
  this.onAwake();
17152
17061
  };
17153
17062
  /**
17154
17063
  * @internal
17155
17064
  * @inheritDoc
17156
- * @override
17157
17065
  */ _proto._onEnable = function _onEnable() {
17158
17066
  if (this._waitHandlingInValid) {
17159
17067
  this._waitHandlingInValid = false;
@@ -17179,7 +17087,6 @@ ShaderPool.init();
17179
17087
  /**
17180
17088
  * @internal
17181
17089
  * @inheritDoc
17182
- * @override
17183
17090
  */ _proto._onDisable = function _onDisable() {
17184
17091
  this._waitHandlingInValid = true;
17185
17092
  this._engine._componentsManager.addDisableScript(this);
@@ -17202,10 +17109,7 @@ ShaderPool.init();
17202
17109
  this._entity._removeScript(this);
17203
17110
  this._waitHandlingInValid = false;
17204
17111
  };
17205
- /**
17206
- * @override
17207
- * @internal
17208
- */ _proto._onDestroy = function _onDestroy() {
17112
+ _proto._onDestroy = function _onDestroy() {
17209
17113
  Component.prototype._onDestroy.call(this);
17210
17114
  this._engine._componentsManager.addPendingDestroyScript(this);
17211
17115
  };
@@ -18878,19 +18782,16 @@ var Camera = (_Camera = /*#__PURE__*/ function(Component) {
18878
18782
  this._replacementSubShaderTag = null;
18879
18783
  };
18880
18784
  /**
18881
- * @override
18882
18785
  * @inheritdoc
18883
18786
  */ _proto._onEnable = function _onEnable() {
18884
18787
  this.entity.scene._attachRenderCamera(this);
18885
18788
  };
18886
18789
  /**
18887
- * @override
18888
18790
  * @inheritdoc
18889
18791
  */ _proto._onDisable = function _onDisable() {
18890
18792
  this.entity.scene._detachRenderCamera(this);
18891
18793
  };
18892
18794
  /**
18893
- * @override
18894
18795
  * @inheritdoc
18895
18796
  */ _proto._onDestroy = function _onDestroy() {
18896
18797
  var _this__renderPipeline;
@@ -19454,7 +19355,6 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19454
19355
  }
19455
19356
  };
19456
19357
  /**
19457
- * @override
19458
19358
  * Clone and return the instance.
19459
19359
  */ _proto.clone = function clone() {
19460
19360
  var dest = new BaseMaterial(this._engine, this.shader);
@@ -19462,7 +19362,6 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19462
19362
  return dest;
19463
19363
  };
19464
19364
  /**
19465
- * @override
19466
19365
  * Clone to the target material.
19467
19366
  * @param target - target material
19468
19367
  */ _proto.cloneTo = function cloneTo(target) {
@@ -19623,8 +19522,8 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19623
19522
  var _this;
19624
19523
  _this = BaseMaterial.call(this, engine, Shader.find("blinn-phong")) || this;
19625
19524
  var shaderData = _this.shaderData;
19626
- shaderData.enableMacro("MATERIAL_NEED_WORLDPOS");
19627
- shaderData.enableMacro("MATERIAL_NEED_TILINGOFFSET");
19525
+ shaderData.enableMacro("MATERIAL_NEED_WORLD_POS");
19526
+ shaderData.enableMacro("MATERIAL_NEED_TILING_OFFSET");
19628
19527
  shaderData.setColor(BlinnPhongMaterial._baseColorProp, new Color$1(1, 1, 1, 1));
19629
19528
  shaderData.setColor(BlinnPhongMaterial._specularColorProp, new Color$1(1, 1, 1, 1));
19630
19529
  shaderData.setColor(BlinnPhongMaterial._emissiveColorProp, new Color$1(0, 0, 0, 1));
@@ -19634,9 +19533,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19634
19533
  return _this;
19635
19534
  }
19636
19535
  var _proto = BlinnPhongMaterial.prototype;
19637
- /**
19638
- * @override
19639
- */ _proto.clone = function clone() {
19536
+ _proto.clone = function clone() {
19640
19537
  var dest = new BlinnPhongMaterial(this._engine);
19641
19538
  this.cloneTo(dest);
19642
19539
  return dest;
@@ -19819,8 +19716,8 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19819
19716
  var _this;
19820
19717
  _this = BaseMaterial.call(this, engine, shader) || this;
19821
19718
  var shaderData = _this.shaderData;
19822
- shaderData.enableMacro("MATERIAL_NEED_WORLDPOS");
19823
- shaderData.enableMacro("MATERIAL_NEED_TILINGOFFSET");
19719
+ shaderData.enableMacro("MATERIAL_NEED_WORLD_POS");
19720
+ shaderData.enableMacro("MATERIAL_NEED_TILING_OFFSET");
19824
19721
  shaderData.setColor(PBRBaseMaterial._baseColorProp, new Color$1(1, 1, 1, 1));
19825
19722
  shaderData.setColor(PBRBaseMaterial._emissiveColorProp, new Color$1(0, 0, 0, 1));
19826
19723
  shaderData.setVector4(PBRBaseMaterial._tilingOffsetProp, new Vector4(1, 1, 0, 0));
@@ -19929,9 +19826,9 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19929
19826
  set: function set(value) {
19930
19827
  this.shaderData.setTexture(PBRBaseMaterial._occlusionTextureProp, value);
19931
19828
  if (value) {
19932
- this.shaderData.enableMacro("OCCLUSIONTEXTURE");
19829
+ this.shaderData.enableMacro("MATERIAL_HAS_OCCLUSION_TEXTURE");
19933
19830
  } else {
19934
- this.shaderData.disableMacro("OCCLUSIONTEXTURE");
19831
+ this.shaderData.disableMacro("MATERIAL_HAS_OCCLUSION_TEXTURE");
19935
19832
  }
19936
19833
  }
19937
19834
  },
@@ -19985,9 +19882,9 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19985
19882
  set: function set(value) {
19986
19883
  if (!!this.shaderData.getFloat(PBRBaseMaterial._clearCoatProp) !== !!value) {
19987
19884
  if (value === 0) {
19988
- this.shaderData.disableMacro("CLEARCOAT");
19885
+ this.shaderData.disableMacro("MATERIAL_ENABLE_CLEAR_COAT");
19989
19886
  } else {
19990
- this.shaderData.enableMacro("CLEARCOAT");
19887
+ this.shaderData.enableMacro("MATERIAL_ENABLE_CLEAR_COAT");
19991
19888
  }
19992
19889
  }
19993
19890
  this.shaderData.setFloat(PBRBaseMaterial._clearCoatProp, value);
@@ -20003,9 +19900,9 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
20003
19900
  set: function set(value) {
20004
19901
  this.shaderData.setTexture(PBRBaseMaterial._clearCoatTextureProp, value);
20005
19902
  if (value) {
20006
- this.shaderData.enableMacro("HAS_CLEARCOATTEXTURE");
19903
+ this.shaderData.enableMacro("MATERIAL_HAS_CLEAR_COAT_TEXTURE");
20007
19904
  } else {
20008
- this.shaderData.disableMacro("HAS_CLEARCOATTEXTURE");
19905
+ this.shaderData.disableMacro("MATERIAL_HAS_CLEAR_COAT_TEXTURE");
20009
19906
  }
20010
19907
  }
20011
19908
  },
@@ -20030,9 +19927,9 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
20030
19927
  set: function set(value) {
20031
19928
  this.shaderData.setTexture(PBRBaseMaterial._clearCoatRoughnessTextureProp, value);
20032
19929
  if (value) {
20033
- this.shaderData.enableMacro("HAS_CLEARCOATROUGHNESSTEXTURE");
19930
+ this.shaderData.enableMacro("MATERIAL_HAS_CLEAR_COAT_ROUGHNESS_TEXTURE");
20034
19931
  } else {
20035
- this.shaderData.disableMacro("HAS_CLEARCOATROUGHNESSTEXTURE");
19932
+ this.shaderData.disableMacro("MATERIAL_HAS_CLEAR_COAT_ROUGHNESS_TEXTURE");
20036
19933
  }
20037
19934
  }
20038
19935
  },
@@ -20046,9 +19943,9 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
20046
19943
  set: function set(value) {
20047
19944
  this.shaderData.setTexture(PBRBaseMaterial._clearCoatNormalTextureProp, value);
20048
19945
  if (value) {
20049
- this.shaderData.enableMacro("HAS_CLEARCOATNORMALTEXTURE");
19946
+ this.shaderData.enableMacro("MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE");
20050
19947
  } else {
20051
- this.shaderData.disableMacro("HAS_CLEARCOATNORMALTEXTURE");
19948
+ this.shaderData.disableMacro("MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE");
20052
19949
  }
20053
19950
  }
20054
19951
  }
@@ -20093,7 +19990,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
20093
19990
  }
20094
19991
  var _proto = PBRMaterial.prototype;
20095
19992
  /**
20096
- * @override
19993
+ * @inheritdoc
20097
19994
  */ _proto.clone = function clone() {
20098
19995
  var dest = new PBRMaterial(this._engine);
20099
19996
  this.cloneTo(dest);
@@ -20133,9 +20030,9 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
20133
20030
  set: function set(value) {
20134
20031
  this.shaderData.setTexture(PBRMaterial._roughnessMetallicTextureProp, value);
20135
20032
  if (value) {
20136
- this.shaderData.enableMacro("MATERIAL_ROUGHNESSMETALLICTEXTURE");
20033
+ this.shaderData.enableMacro("MATERIAL_HAS_ROUGHNESS_METALLIC_TEXTURE");
20137
20034
  } else {
20138
- this.shaderData.disableMacro("MATERIAL_ROUGHNESSMETALLICTEXTURE");
20035
+ this.shaderData.disableMacro("MATERIAL_HAS_ROUGHNESS_METALLIC_TEXTURE");
20139
20036
  }
20140
20037
  }
20141
20038
  }
@@ -20165,7 +20062,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
20165
20062
  }
20166
20063
  var _proto = PBRSpecularMaterial.prototype;
20167
20064
  /**
20168
- * @override
20065
+ * @inheritdoc
20169
20066
  */ _proto.clone = function clone() {
20170
20067
  var dest = new PBRSpecularMaterial(this._engine);
20171
20068
  this.cloneTo(dest);
@@ -20227,7 +20124,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
20227
20124
  PBRSpecularMaterial._specularGlossinessTextureProp = ShaderProperty.getByName("material_SpecularGlossinessTexture");
20228
20125
  })();
20229
20126
  (function() {
20230
- PBRSpecularMaterial._specularGlossinessTextureMacro = ShaderMacro.getByName("MATERIAL_HAS_SPECULARGLOSSINESSTEXTURE");
20127
+ PBRSpecularMaterial._specularGlossinessTextureMacro = ShaderMacro.getByName("MATERIAL_HAS_SPECULAR_GLOSSINESS_TEXTURE");
20231
20128
  })();
20232
20129
 
20233
20130
  /**
@@ -20239,14 +20136,14 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
20239
20136
  _this = BaseMaterial.call(this, engine, Shader.find("unlit")) || this;
20240
20137
  var shaderData = _this.shaderData;
20241
20138
  shaderData.enableMacro("MATERIAL_OMIT_NORMAL");
20242
- shaderData.enableMacro("MATERIAL_NEED_TILINGOFFSET");
20139
+ shaderData.enableMacro("MATERIAL_NEED_TILING_OFFSET");
20243
20140
  shaderData.setColor(UnlitMaterial._baseColorProp, new Color$1(1, 1, 1, 1));
20244
20141
  shaderData.setVector4(UnlitMaterial._tilingOffsetProp, new Vector4(1, 1, 0, 0));
20245
20142
  return _this;
20246
20143
  }
20247
20144
  var _proto = UnlitMaterial.prototype;
20248
20145
  /**
20249
- * @override
20146
+ * @inheritdoc
20250
20147
  */ _proto.clone = function clone() {
20251
20148
  var dest = new UnlitMaterial(this._engine);
20252
20149
  this.cloneTo(dest);
@@ -20363,10 +20260,7 @@ var TextVerticalAlignment;
20363
20260
  */ _proto._addSprite = function _addSprite(sprite) {
20364
20261
  this._spriteNamesToIndex[sprite.name] = this._sprites.push(sprite) - 1;
20365
20262
  };
20366
- /**
20367
- * @override
20368
- * @internal
20369
- */ _proto._onDestroy = function _onDestroy() {
20263
+ _proto._onDestroy = function _onDestroy() {
20370
20264
  ReferResource.prototype._onDestroy.call(this);
20371
20265
  this._sprites = null;
20372
20266
  this._spriteNamesToIndex = null;
@@ -20475,10 +20369,7 @@ var TextVerticalAlignment;
20475
20369
  this._dirtyUpdateFlag & 0x1 && this._updatePositions();
20476
20370
  return this._bounds;
20477
20371
  };
20478
- /**
20479
- * @override
20480
- * @internal
20481
- */ _proto._onDestroy = function _onDestroy() {
20372
+ _proto._onDestroy = function _onDestroy() {
20482
20373
  ReferResource.prototype._onDestroy.call(this);
20483
20374
  this._texture = null;
20484
20375
  };
@@ -21216,15 +21107,11 @@ var TiledType;
21216
21107
  target._assembler.resetData(target);
21217
21108
  target.sprite = this._sprite;
21218
21109
  };
21219
- /**
21220
- * @override
21221
- */ _proto._updateShaderData = function _updateShaderData(context) {
21110
+ _proto._updateShaderData = function _updateShaderData(context) {
21222
21111
  // @ts-ignore
21223
21112
  this._updateTransformShaderData(context, Matrix._identity);
21224
21113
  };
21225
- /**
21226
- * @override
21227
- */ _proto._updateBounds = function _updateBounds(worldBounds) {
21114
+ _proto._updateBounds = function _updateBounds(worldBounds) {
21228
21115
  var _this_sprite;
21229
21116
  if (!((_this_sprite = this.sprite) == null ? void 0 : _this_sprite.texture) || !this.width || !this.height) {
21230
21117
  worldBounds.min.set(0, 0, 0);
@@ -21233,9 +21120,7 @@ var TiledType;
21233
21120
  this._assembler.updatePositions(this);
21234
21121
  }
21235
21122
  };
21236
- /**
21237
- * @override
21238
- */ _proto._render = function _render(context) {
21123
+ _proto._render = function _render(context) {
21239
21124
  var _this_sprite;
21240
21125
  if (!((_this_sprite = this.sprite) == null ? void 0 : _this_sprite.texture) || !this.width || !this.height) {
21241
21126
  return;
@@ -21258,7 +21143,6 @@ var TiledType;
21258
21143
  context.camera._renderPipeline.pushRenderData(context, renderData);
21259
21144
  };
21260
21145
  /**
21261
- * @override
21262
21146
  * @internal
21263
21147
  */ _proto._onDestroy = function _onDestroy() {
21264
21148
  var _this__sprite;
@@ -21647,9 +21531,7 @@ var /**
21647
21531
  this._font._addReferCount(1);
21648
21532
  this.setMaterial(engine._spriteDefaultMaterial);
21649
21533
  };
21650
- /**
21651
- * @internal
21652
- */ _proto._onDestroy = function _onDestroy() {
21534
+ _proto._onDestroy = function _onDestroy() {
21653
21535
  Renderer.prototype._onDestroy.call(this);
21654
21536
  // Clear render data.
21655
21537
  var charRenderDatas = this._charRenderDatas;
@@ -21684,20 +21566,14 @@ var /**
21684
21566
  */ _proto._setDirtyFlagFalse = function _setDirtyFlagFalse(type) {
21685
21567
  this._dirtyFlag &= ~type;
21686
21568
  };
21687
- /**
21688
- * @override
21689
- */ _proto._updateShaderData = function _updateShaderData(context) {
21569
+ _proto._updateShaderData = function _updateShaderData(context) {
21690
21570
  // @ts-ignore
21691
21571
  this._updateTransformShaderData(context, Matrix._identity);
21692
21572
  };
21693
- /**
21694
- * @override
21695
- */ _proto._updateBounds = function _updateBounds(worldBounds) {
21573
+ _proto._updateBounds = function _updateBounds(worldBounds) {
21696
21574
  BoundingBox.transform(this._localBounds, this._entity.transform.worldMatrix, worldBounds);
21697
21575
  };
21698
- /**
21699
- * @override
21700
- */ _proto._render = function _render(context) {
21576
+ _proto._render = function _render(context) {
21701
21577
  if (this._text === "" || this.enableWrapping && this.width <= 0 || this.overflowMode === OverflowMode.Truncate && this.height <= 0) {
21702
21578
  return;
21703
21579
  }
@@ -22932,7 +22808,6 @@ var AnimationFloatArrayCurve = (_AnimationFloatArrayCurve = /*#__PURE__*/ functi
22932
22808
  var _proto = AnimationFloatArrayCurve.prototype;
22933
22809
  /**
22934
22810
  * @inheritdoc
22935
- * @override
22936
22811
  */ _proto.addKey = function addKey(key) {
22937
22812
  AnimationCurve.prototype.addKey.call(this, key);
22938
22813
  var evaluateData = this._evaluateData;
@@ -23714,7 +23589,6 @@ var AnimatorLayerBlendingMode;
23714
23589
  return this._getAnimatorStateInfo(stateName, layerIndex).state;
23715
23590
  };
23716
23591
  /**
23717
- * @override
23718
23592
  * @internal
23719
23593
  */ _proto._onEnable = function _onEnable() {
23720
23594
  this.engine._componentsManager.addOnUpdateAnimations(this);
@@ -23722,7 +23596,6 @@ var AnimatorLayerBlendingMode;
23722
23596
  this._entity.getComponentsIncludeChildren(Renderer, this._controlledRenderers);
23723
23597
  };
23724
23598
  /**
23725
- * @override
23726
23599
  * @internal
23727
23600
  */ _proto._onDisable = function _onDisable() {
23728
23601
  this.engine._componentsManager.removeOnUpdateAnimations(this);
@@ -24547,9 +24420,7 @@ var AnimatorConditionMode;
24547
24420
  return _this;
24548
24421
  }
24549
24422
  var _proto = SkyBoxMaterial.prototype;
24550
- /**
24551
- * @override
24552
- */ _proto.clone = function clone() {
24423
+ _proto.clone = function clone() {
24553
24424
  var dest = new SkyBoxMaterial(this._engine);
24554
24425
  this.cloneTo(dest);
24555
24426
  return dest;
@@ -24662,7 +24533,7 @@ var SunMode;
24662
24533
  }
24663
24534
  var _proto = SkyProceduralMaterial.prototype;
24664
24535
  /**
24665
- * @override
24536
+ * @inheritDoc
24666
24537
  */ _proto.clone = function clone() {
24667
24538
  var dest = new SkyProceduralMaterial(this._engine);
24668
24539
  this.cloneTo(dest);
@@ -24860,7 +24731,6 @@ var ParticleRendererBlendMode;
24860
24731
  }
24861
24732
  var _proto = ParticleRenderer.prototype;
24862
24733
  /**
24863
- * @override
24864
24734
  * @internal
24865
24735
  */ _proto.update = function update(deltaTime) {
24866
24736
  if (!this._isInit || !this._isStart) {
@@ -24878,7 +24748,6 @@ var ParticleRendererBlendMode;
24878
24748
  this.shaderData.setFloat("u_time", this._time);
24879
24749
  };
24880
24750
  /**
24881
- * @override
24882
24751
  * @internal
24883
24752
  */ _proto._onEnable = function _onEnable() {
24884
24753
  MeshRenderer.prototype._onEnable.call(this);
@@ -25657,9 +25526,7 @@ var _tempVector3 = new Vector3();
25657
25526
  this.getMaterial().shaderData.setTexture("u_texture", texture);
25658
25527
  }
25659
25528
  };
25660
- /**
25661
- * @override
25662
- */ _proto._render = function _render(context) {
25529
+ _proto._render = function _render(context) {
25663
25530
  this._updateStrapVertices(context.camera, this._points);
25664
25531
  this._updateStrapCoords();
25665
25532
  this._vertexBuffer.setData(this._vertices);
@@ -25805,9 +25672,7 @@ var _tempVector3 = new Vector3();
25805
25672
  * Provide hooks for users to exchange Texture.
25806
25673
  * @remarks Prevent issue: Feedback Loops Between Textures and the Framebuffer.
25807
25674
  */ _proto.onTextureChange = function onTextureChange(renderColorTexture) {};
25808
- /**
25809
- * @override
25810
- */ _proto.onBeginRender = function onBeginRender(camera) {
25675
+ _proto.onBeginRender = function onBeginRender(camera) {
25811
25676
  if (!this.enabled) return;
25812
25677
  this._camera = camera;
25813
25678
  this._oriCameraCullingMask = camera.cullingMask;
@@ -25820,9 +25685,7 @@ var _tempVector3 = new Vector3();
25820
25685
  this._oriCameraRenderTarget = camera.renderTarget;
25821
25686
  camera.renderTarget = this._activeRenderTarget;
25822
25687
  };
25823
- /**
25824
- * @override
25825
- */ _proto.onEndRender = function onEndRender(camera) {
25688
+ _proto.onEndRender = function onEndRender(camera) {
25826
25689
  if (!this.enabled) return;
25827
25690
  this.onTextureChange && this.onTextureChange(this._texture);
25828
25691
  this._activeRenderTarget = this._activeRenderTarget === this._renderTarget ? this._renderTargetSwap : this._renderTarget;
@@ -25857,16 +25720,12 @@ var cacheDir = new Vector3();
25857
25720
  /**
25858
25721
  * The position of the probe can be set, the default is the origin [0,0,0].
25859
25722
  */ _this.position = new Vector3(0, 0, 0);
25860
- /**
25861
- * @override
25862
- */ _this._isCube = true;
25723
+ _this._isCube = true;
25863
25724
  _this.oriViewMatrix = new Matrix();
25864
25725
  return _this;
25865
25726
  }
25866
25727
  var _proto = CubeProbe.prototype;
25867
- /**
25868
- * @override
25869
- */ _proto.onBeginRender = function onBeginRender(camera) {
25728
+ _proto.onBeginRender = function onBeginRender(camera) {
25870
25729
  if (!this.enabled) return;
25871
25730
  Probe.prototype.onBeginRender.call(this, camera);
25872
25731
  this._storeCamera(camera);