@galacean/engine-core 2.0.0-alpha.59 → 2.0.0-alpha.60

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/engine-core",
3
- "version": "2.0.0-alpha.59",
3
+ "version": "2.0.0-alpha.60",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -18,8 +18,8 @@
18
18
  "types/**/*"
19
19
  ],
20
20
  "dependencies": {
21
- "@galacean/engine-design": "2.0.0-alpha.59",
22
- "@galacean/engine-math": "2.0.0-alpha.59"
21
+ "@galacean/engine-design": "2.0.0-alpha.60",
22
+ "@galacean/engine-math": "2.0.0-alpha.60"
23
23
  },
24
24
  "scripts": {
25
25
  "b:types": "tsc"
package/types/Engine.d.ts CHANGED
@@ -35,10 +35,6 @@ export declare class Engine extends EventDispatcher {
35
35
  /** @internal */
36
36
  static _builtinShaders: BuiltinShaders;
37
37
  /** @internal */
38
- static _noDepthTextureMacro: ShaderMacro;
39
- /** @internal */
40
- static _noSRGBSupportMacro: ShaderMacro;
41
- /** @internal */
42
38
  static _outputSRGBCorrectMacro: ShaderMacro;
43
39
  /** @internal Conversion of space units to pixel units for 2D. */
44
40
  static _pixelsPerUnit: number;
@@ -19,7 +19,6 @@ export declare class BasicRenderPipeline {
19
19
  private _opaqueTexturePass;
20
20
  private _finalPass;
21
21
  private _copyBackgroundTexture;
22
- private _canUseBlitFrameBuffer;
23
22
  private _shouldCopyBackgroundColor;
24
23
  /**
25
24
  * Create a basic render pipeline.
@@ -1,5 +1,4 @@
1
1
  import { Camera } from "../Camera";
2
- import { Engine } from "../Engine";
3
2
  import { PipelinePass } from "../RenderPipeline/PipelinePass";
4
3
  import { RenderTarget } from "../texture/RenderTarget";
5
4
  import { CullingResults } from "./CullingResults";
@@ -9,9 +8,7 @@ import { RenderContext } from "./RenderContext";
9
8
  * Depth only pass.
10
9
  */
11
10
  export declare class DepthOnlyPass extends PipelinePass {
12
- readonly supportDepthTexture: boolean;
13
11
  renderTarget: RenderTarget | null;
14
- constructor(engine: Engine);
15
12
  onConfig(camera: Camera): void;
16
13
  onRender(context: RenderContext, cullingResults: CullingResults): void;
17
14
  release(): void;
@@ -14,8 +14,6 @@ export declare enum AssetType {
14
14
  Material = "Material",
15
15
  /** Shader. */
16
16
  Shader = "Shader",
17
- /** Mesh. */
18
- Mesh = "Mesh",
19
17
  /** AnimationClip. */
20
18
  AnimationClip = "AnimationClip",
21
19
  /** AnimatorController. */
@@ -74,29 +74,13 @@ export declare enum DataType {
74
74
  UNSIGNED_INT = 5125
75
75
  }
76
76
  /**
77
- * GL Capabilities
78
- * Some capabilities can be smoothed out by extension, and some capabilities must use WebGL 2.0.
77
+ * Optional GL capabilities.
79
78
  * */
80
79
  export declare enum GLCapabilityType {
81
- shaderVertexID = "shaderVertexID",
82
- standardDerivatives = "OES_standard_derivatives",
83
- shaderTextureLod = "EXT_shader_texture_lod",
84
- elementIndexUint = "OES_element_index_uint",
85
- depthTexture = "WEBGL_depth_texture",
86
- drawBuffers = "WEBGL_draw_buffers",
87
- vertexArrayObject = "OES_vertex_array_object",
88
- instancedArrays = "ANGLE_instanced_arrays",
89
- multipleSample = "multipleSampleOnlySupportedInWebGL2",
90
- textureFloat = "OES_texture_float",
91
80
  textureFloatLinear = "OES_texture_float_linear",
92
- textureHalfFloat = "OES_texture_half_float",
93
- textureHalfFloatLinear = "OES_texture_half_float_linear",
94
- WEBGL_colorBufferFloat = "WEBGL_color_buffer_float",
95
81
  colorBufferFloat = "EXT_color_buffer_float",
96
82
  colorBufferHalfFloat = "EXT_color_buffer_half_float",
97
83
  textureFilterAnisotropic = "EXT_texture_filter_anisotropic",
98
- blendMinMax = "EXT_blend_minmax",
99
- fragDepth = "EXT_frag_depth",
100
84
  astc = "WEBGL_compressed_texture_astc",
101
85
  astc_webkit = "WEBKIT_WEBGL_compressed_texture_astc",
102
86
  astc_hdr = "WEBGL_compressed_texture_astc_hdr",
@@ -110,7 +94,6 @@ export declare enum GLCapabilityType {
110
94
  s3tc_webkit = "WEBKIT_WEBGL_compressed_texture_s3tc",
111
95
  s3tc_srgb = "WEBGL_compressed_texture_s3tc_srgb",
112
96
  bptc = "EXT_texture_compression_bptc",
113
- WEBGL_lose_context = "WEBGL_lose_context",
114
- sRGB = "EXT_sRGB"
97
+ WEBGL_lose_context = "WEBGL_lose_context"
115
98
  }
116
99
  export type TypedArray = Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array;
@@ -17,7 +17,6 @@ export declare class ScalableAmbientObscurancePass extends PipelinePass {
17
17
  private static _peak2Prop;
18
18
  private static _powerProp;
19
19
  private static _invProjScaleXYProp;
20
- readonly isSupported: boolean;
21
20
  private static _farPlaneOverEdgeDistanceProp;
22
21
  private static _kernelProp;
23
22
  private readonly _material;
@@ -43,7 +43,6 @@ export declare class BlendShapeManager {
43
43
  private readonly _engine;
44
44
  private readonly _modelMesh;
45
45
  private readonly _lastHostCreatedInfo;
46
- private readonly _canUseTextureStoreData;
47
46
  private readonly _dataTextureInfo;
48
47
  constructor(engine: Engine, modelMesh: ModelMesh);
49
48
  /**
@@ -36,7 +36,6 @@ export declare class ParticleRenderer extends Renderer {
36
36
  private _mesh;
37
37
  private _renderMode;
38
38
  private _currentRenderModeMacro;
39
- private readonly _supportInstancedArrays;
40
39
  /**
41
40
  * Specifies how particles are rendered.
42
41
  */
@@ -68,10 +67,6 @@ export declare class ParticleRenderer extends Renderer {
68
67
  * @internal
69
68
  */
70
69
  _onDisableInScene(): void;
71
- /**
72
- * @internal
73
- */
74
- _prepareRender(context: RenderContext): void;
75
70
  /**
76
71
  * @internal
77
72
  */
@@ -137,7 +137,6 @@ export declare class LimitVelocityOverLifetimeModule extends ParticleGeneratorMo
137
137
  set space(value: ParticleSimulationSpace);
138
138
  /**
139
139
  * Specifies whether the module is enabled.
140
- * @remarks This module requires WebGL2, On WebGL1, enabling will be silently ignored.
141
140
  */
142
141
  get enabled(): boolean;
143
142
  set enabled(value: boolean);
@@ -18,8 +18,7 @@ import type { IPlatformTransformFeedbackPrimitive } from "./IPlatformTransformFe
18
18
  /** Graphics resource and command boundary used by the engine. */
19
19
  export interface IHardwareRenderer {
20
20
  /** WebGL access requires a graphics-capable backend. */
21
- readonly gl: WebGLRenderingContext | WebGL2RenderingContext;
22
- readonly isWebGL2: boolean;
21
+ readonly gl: WebGL2RenderingContext;
23
22
  readonly maxUniformBlockSize: number;
24
23
  /** Whether this device can execute rendering commands. */
25
24
  readonly supportsRendering: boolean;
@@ -27,10 +26,7 @@ export interface IHardwareRenderer {
27
26
  readonly maxTextureSize: number;
28
27
  readonly maxAntiAliasing: number;
29
28
  readonly maxVertexUniformVectors: number;
30
- readonly canUseFloatTextureBlendShape: boolean;
31
- readonly isFragmentHighPrecision: boolean;
32
29
  };
33
- readonly canIUseMoreJoints: boolean;
34
30
  /** @internal */
35
31
  readonly _options: {
36
32
  readonly depth?: boolean;
@@ -5,7 +5,6 @@ import { IPlatformTexture } from "./IPlatformTexture";
5
5
  export interface IPlatformTexture2D extends IPlatformTexture {
6
6
  /**
7
7
  * Setting pixels data through color buffer data, designated area and texture mipmapping level,it's also applicable to compressed formats.
8
- * @remarks If it is the WebGL1.0 platform and the texture format is compressed, the first upload must be filled with textures.
9
8
  * @param colorBuffer - Color buffer data
10
9
  * @param mipLevel - Texture mipmapping level
11
10
  * @param x - X coordinate of area start
@@ -6,7 +6,6 @@ import { IPlatformTexture } from "./IPlatformTexture";
6
6
  export interface IPlatformTextureCube extends IPlatformTexture {
7
7
  /**
8
8
  * Setting pixels data through cube face,color buffer data, designated area and texture mipmapping level,it's also applicable to compressed formats.
9
- * @remarks When compressed texture is in WebGL1, the texture must be filled first before writing the sub-region
10
9
  * @param face - Cube face
11
10
  * @param colorBuffer - Color buffer data
12
11
  * @param mipLevel - Texture mipmapping level
@@ -32,7 +32,7 @@ export declare class Shader implements IReferable {
32
32
  * ```
33
33
  *
34
34
  * @param shaderSource - Shader code
35
- * @param platformTarget - Shader platform target, @defaultValue ShaderLanguage.GLSLES100
35
+ * @param platformTarget - Shader platform target, @defaultValue ShaderLanguage.GLSLES300
36
36
  * @returns A new shader. Shaders with the same name remain independent objects.
37
37
  *
38
38
  * @throws
@@ -2,17 +2,14 @@ import { Engine } from "../Engine";
2
2
  import { ShaderProperty } from "./ShaderProperty";
3
3
  /**
4
4
  * Shader registry and GLSL utilities. Holds the `#include` lookup table
5
- * the runtime preprocessor reads, the GLSL ES 100 → 300 syntax converter
6
- * the WebGL2 path uses, and the GPU-instancing UBO injector that
5
+ * the runtime preprocessor reads and the GPU-instancing UBO injector that
7
6
  * `ShaderPass` runs over compiled GLSL source.
8
7
  */
9
8
  export declare class ShaderFactory {
10
9
  static readonly RENDERER_INSTANCE_BLOCK_NAME = "RendererInstanceData";
11
10
  static readonly uniformBlockBindingMap: Record<number, number>;
12
11
  static readonly includeMap: Record<string, string>;
13
- static readonly shaderExtension: string;
14
12
  private static readonly _std140TypeInfoMap;
15
- private static readonly _has300OutInFragReg;
16
13
  private static readonly _derivedDefines;
17
14
  private static readonly _builtinRendererUniforms;
18
15
  private static readonly _cameraMatrixCandidates;
@@ -38,12 +35,6 @@ export declare class ShaderFactory {
38
35
  * @throws Error when the key is empty or malformed.
39
36
  */
40
37
  static unRegisterInclude(includeName: string): void;
41
- /**
42
- * Convert lower GLSL version to GLSL 300 es.
43
- * @param shader - code
44
- * @param isFrag - Whether it is a fragment shader.
45
- */
46
- static convertTo300(shader: string, isFrag?: boolean): string;
47
38
  /**
48
39
  * Scan VS/FS for renderer-group `uniform` declarations, replace them with a shared
49
40
  * std140 UBO (instanced array), and emit `#define` remapping so original uniform
@@ -61,7 +52,6 @@ export declare class ShaderFactory {
61
52
  private static _buildMissingCameraDecls;
62
53
  private static _buildUBODeclaration;
63
54
  private static _buildFieldDefines;
64
- private static _replaceMRTShader;
65
55
  }
66
56
  /**
67
57
  * @internal
@@ -15,8 +15,6 @@ export declare class ShaderPass extends ShaderPart {
15
15
  static _shaderPassCounter: number;
16
16
  private static _shaderMacroList;
17
17
  private static _macroMap;
18
- /** @internal */
19
- _platformTarget: ShaderLanguage;
20
18
  /** @internal - Flat instruction array for vertex shader. */
21
19
  _vertexShaderInstructions: ShaderInstruction[];
22
20
  /** @internal */
@@ -35,11 +33,11 @@ export declare class ShaderPass extends ShaderPart {
35
33
  * @param name - Shader pass name
36
34
  * @param vertexShaderInstructions - Precompiled vertex instruction array
37
35
  * @param fragmentShaderInstructions - Precompiled fragment instruction array
38
- * @param platformTarget - Target shader language
36
+ * @param _platformTarget - Target shader language
39
37
  * @param tags - Tags
40
38
  * @param vertexOutputNames - Source output names mapped to generated GLSL names
41
39
  */
42
- constructor(name: string, vertexShaderInstructions: ShaderInstruction[], fragmentShaderInstructions: ShaderInstruction[], platformTarget: ShaderLanguage, tags?: Record<string, number | string | boolean>, vertexOutputNames?: Readonly<Record<string, string>>);
40
+ constructor(name: string, vertexShaderInstructions: ShaderInstruction[], fragmentShaderInstructions: ShaderInstruction[], _platformTarget: ShaderLanguage, tags?: Record<string, number | string | boolean>, vertexOutputNames?: Readonly<Record<string, string>>);
43
41
  /**
44
42
  * @internal
45
43
  */
@@ -2,8 +2,6 @@
2
2
  * Shader language belongs to.
3
3
  */
4
4
  export declare enum ShaderLanguage {
5
- /** GLSL ES 100. */
6
- GLSLES100 = 0,
7
5
  /** GLSL ES 300. */
8
- GLSLES300 = 1
6
+ GLSLES300 = 0
9
7
  }
@@ -15,16 +15,13 @@ export declare class CascadedShadowCasterPass extends PipelinePass {
15
15
  private static _maxCascades;
16
16
  private static _cascadesSplitDistance;
17
17
  private static _viewport;
18
- private static _clearColor;
19
18
  private static _tempVector;
20
19
  private static _tempMatrix0;
21
20
  private readonly _camera;
22
- private readonly _supportDepthTexture;
23
21
  private _shadowMapResolution;
24
22
  private _shadowMapSize;
25
23
  private _shadowTileResolution;
26
24
  private _shadowBias;
27
- private _shadowMapFormat;
28
25
  private _shadowCascadeMode;
29
26
  private _shadowSliceData;
30
27
  private _lightUp;
@@ -3,7 +3,6 @@ import { Camera } from "../Camera";
3
3
  import { RenderContext } from "../RenderPipeline/RenderContext";
4
4
  import { Renderer } from "../Renderer";
5
5
  import { DirectLight, Light } from "../lighting";
6
- import { TextureFormat } from "../texture";
7
6
  import { ShadowSliceData } from "./ShadowSliceData";
8
7
  import { ShadowResolution } from "./enum/ShadowResolution";
9
8
  /**
@@ -24,7 +23,6 @@ export declare class ShadowUtils {
24
23
  private static _frustumTwoPlaneCorners;
25
24
  static readonly atlasBorderSize: number;
26
25
  static shadowResolution(value: ShadowResolution): number;
27
- static shadowDepthFormat(value: ShadowResolution, supportDepthTexture: boolean): TextureFormat;
28
26
  static cullingRenderBounds(bounds: BoundingBox, cullPlaneCount: number, cullPlanes: Plane[]): boolean;
29
27
  static shadowCullFrustum(context: RenderContext, light: Light, renderer: Renderer, shadowSliceData: ShadowSliceData): void;
30
28
  static getBoundSphereByFrustum(near: number, far: number, camera: Camera, forward: Vector3, shadowSliceData: ShadowSliceData): void;
@@ -19,7 +19,6 @@ export declare class Texture2D extends Texture {
19
19
  constructor(engine: Engine, width: number, height: number, format?: TextureFormat, mipmap?: boolean, isSRGBColorSpace?: boolean, usage?: TextureUsage);
20
20
  /**
21
21
  * Setting pixels data through color buffer data, designated area and texture mipmapping level,it's also applicable to compressed formats.
22
- * @remarks If it is the WebGL1.0 platform and the texture format is compressed, the first upload must be filled with textures.
23
22
  * @param colorBuffer - Color buffer data
24
23
  * @param mipLevel - Texture mipmapping level
25
24
  * @param x - X coordinate of area start
@@ -23,7 +23,6 @@ export declare class Texture2DArray extends Texture {
23
23
  constructor(engine: Engine, width: number, height: number, length: number, format?: TextureFormat, mipmap?: boolean, isSRGBColorSpace?: boolean);
24
24
  /**
25
25
  * Setting pixels data through color buffer data, designated area and texture mipmapping level,it's also applicable to compressed formats.
26
- * @remarks If it is the WebGL1.0 platform and the texture format is compressed, the first upload must be filled with textures.
27
26
  * @param offsetIndex - The texture array element offset index
28
27
  * @param colorBuffer - Color buffer data
29
28
  * @param mipLevel - Texture mipmapping level
@@ -17,7 +17,6 @@ export declare class TextureCube extends Texture {
17
17
  constructor(engine: Engine, size: number, format?: TextureFormat, mipmap?: boolean, isSRGBColorSpace?: boolean);
18
18
  /**
19
19
  * Setting pixels data through cube face,color buffer data, designated area and texture mipmapping level,it's also applicable to compressed formats.
20
- * @remarks When compressed texture is in WebGL1, the texture must be filled first before writing the sub-region
21
20
  * @param face - Cube face
22
21
  * @param colorBuffer - Color buffer data
23
22
  * @param mipLevel - Texture mipmapping level
@@ -1,4 +1,3 @@
1
- import { Engine } from "../Engine";
2
1
  import { TextureFormat } from "./enums/TextureFormat";
3
2
  /**
4
3
  * @internal
@@ -7,11 +6,10 @@ export declare class TextureUtils {
7
6
  /**
8
7
  * Check if the texture config supports auto mipmap generation with real correction for mipmap and isSRGBColorSpace.
9
8
  */
10
- static supportGenerateMipmapsWithCorrection(engine: Engine, width: number, height: number, format: TextureFormat, mipmap: boolean, isSRGBColorSpace: boolean): boolean;
9
+ static supportGenerateMipmapsWithCorrection(format: TextureFormat, mipmap: boolean, isSRGBColorSpace: boolean): boolean;
11
10
  static isHDRFormat(format: TextureFormat): boolean;
12
11
  static supportSRGB(format: TextureFormat): boolean;
13
- static supportMipmaps(width: number, height: any, isWebGL2: boolean): boolean;
14
- static supportGenerateMipmaps(format: TextureFormat, mipmap: boolean, isSRGBColorSpace: boolean, isWebGL2: boolean): boolean;
12
+ static supportGenerateMipmaps(format: TextureFormat, mipmap: boolean, isSRGBColorSpace: boolean): boolean;
15
13
  static getTextureByteCount(format: TextureFormat, width: number, height: number, mipmapCount: number, faceCount: number): number;
16
14
  static getMipLevelByteCount(format: TextureFormat, width: number, height: number): number;
17
15
  }
@@ -75,13 +75,5 @@ export declare enum TextureFormat {
75
75
  /** 16-bit depth + 8-bit stencil format. */
76
76
  Depth24Stencil8 = 33,
77
77
  /** 32-bit depth + 8-bit stencil format. */
78
- Depth32Stencil8 = 34,
79
- /** @deprecated Use 'TextureFormat.R8' instead. */
80
- Alpha8 = 5,
81
- /** @deprecated Use 'TextureFormat.R8G8' instead. */
82
- LuminanceAlpha = 6,
83
- /** @deprecated Use `TextureFormat.BC1` instead. */
84
- DXT1 = 10,
85
- /** @deprecated Use `TextureFormat.BC3` instead. */
86
- DXT5 = 11
78
+ Depth32Stencil8 = 34
87
79
  }