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

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.60",
3
+ "version": "2.0.0-alpha.61",
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.60",
22
- "@galacean/engine-math": "2.0.0-alpha.60"
21
+ "@galacean/engine-design": "2.0.0-alpha.61",
22
+ "@galacean/engine-math": "2.0.0-alpha.61"
23
23
  },
24
24
  "scripts": {
25
25
  "b:types": "tsc"
@@ -77,6 +77,7 @@ export declare enum DataType {
77
77
  * Optional GL capabilities.
78
78
  * */
79
79
  export declare enum GLCapabilityType {
80
+ textureNorm16 = "EXT_texture_norm16",
80
81
  textureFloatLinear = "OES_texture_float_linear",
81
82
  colorBufferFloat = "EXT_color_buffer_float",
82
83
  colorBufferHalfFloat = "EXT_color_buffer_half_float",
@@ -67,7 +67,9 @@ export declare abstract class Texture extends GraphicsResource {
67
67
  get mipmapCount(): number;
68
68
  /**
69
69
  * Sampling filter mode.
70
- * @remarks Integer formats (`TextureFormat.R32G32B32A32_UInt`) only accept `TextureFilterMode.Point`; other modes log a warning and are ignored.
70
+ * @remarks
71
+ * Integer formats (`TextureFormat.R32G32B32A32_UInt`) only accept `TextureFilterMode.Point`; other modes log a warning and are ignored.
72
+ * For 32-bit float formats, linear modes are kept on this property and fall back to `TextureFilterMode.Point` when sampling if the device does not support linear float filtering.
71
73
  */
72
74
  get filterMode(): TextureFilterMode;
73
75
  set filterMode(value: TextureFilterMode);
@@ -11,7 +11,7 @@ export declare class Texture2D extends Texture {
11
11
  * @param engine - Define the engine to use to render this texture
12
12
  * @param width - Texture width
13
13
  * @param height - Texture height
14
- * @param format - Texture format. default `TextureFormat.R8G8B8A8`
14
+ * @param format - Texture format. default `TextureFormat.R8G8B8A8_UNorm`
15
15
  * @param mipmap - Whether to use multi-level texture
16
16
  * @param isSRGBColorSpace - Whether the texture data is in sRGB color space, otherwise is linear color space. @defaultValue `true`
17
17
  * @param usage - Texture usage
@@ -16,7 +16,7 @@ export declare class Texture2DArray extends Texture {
16
16
  * @param width - Texture width
17
17
  * @param height - Texture height
18
18
  * @param length - Texture length
19
- * @param format - Texture format. default `TextureFormat.R8G8B8A8`
19
+ * @param format - Texture format. default `TextureFormat.R8G8B8A8_UNorm`
20
20
  * @param mipmap - Whether to use multi-level texture
21
21
  * @param isSRGBColorSpace - Whether the texture data is in sRGB color space, otherwise is linear color space. @defaultValue `true`
22
22
  */
@@ -10,7 +10,7 @@ export declare class TextureCube extends Texture {
10
10
  * Create TextureCube.
11
11
  * @param engine - Define the engine to use to render this texture
12
12
  * @param size - Texture size. texture width must be equal to height in cube texture
13
- * @param format - Texture format,default TextureFormat.R8G8B8A8
13
+ * @param format - Texture format,default TextureFormat.R8G8B8A8_UNorm
14
14
  * @param mipmap - Whether to use multi-level texture
15
15
  * @param isSRGBColorSpace - Whether the texture data is in sRGB color space, otherwise is linear color space. @defaultValue `true`
16
16
  */
@@ -1,79 +1,89 @@
1
1
  /**
2
- * Texture format enumeration.
2
+ * Pixel storage format for textures and render targets.
3
3
  */
4
4
  export declare enum TextureFormat {
5
- /** RGB format, 8 bits per channel. */
6
- R8G8B8 = 0,
7
- /** RGBA format, 8 bits per channel. */
8
- R8G8B8A8 = 1,
9
- /** RGBA format, 4 bits per channel. */
10
- R4G4B4A4 = 2,
11
- /** RGBA format, 5 bits in R channel, 5 bits in G channel, 5 bits in B channel, 1 bit in A channel. */
12
- R5G5B5A1 = 3,
13
- /** RGB format, 5 bits in R channel, 6 bits in G channel, 5 bits in B channel. */
14
- R5G6B5 = 4,
15
- /** RGBA format, 16 bits per channel. */
16
- R16G16B16A16 = 7,
17
- /** RGBA format, 32 bits per channel. */
18
- R32G32B32A32 = 8,
19
- /** RGBA unsigned integer format, 32 bits per channel. */
5
+ /** RGB 8-bit unsigned normalized format. `getPixelBuffer` outputs RGBA `Uint8Array`. */
6
+ R8G8B8_UNorm = 0,
7
+ /** RGBA 8-bit unsigned normalized format. */
8
+ R8G8B8A8_UNorm = 1,
9
+ /** Packed RGBA 4-4-4-4 unsigned normalized format. */
10
+ R4G4B4A4_UNorm = 2,
11
+ /** Packed RGBA 5-5-5-1 unsigned normalized format. */
12
+ R5G5B5A1_UNorm = 3,
13
+ /** Packed RGB 5-6-5 unsigned normalized format. */
14
+ R5G6B5_UNorm = 4,
15
+ /** RGBA 16-bit signed float format (half-float `Uint16Array`). `getPixelBuffer` outputs RGBA `Float32Array`. */
16
+ R16G16B16A16_SFloat = 7,
17
+ /** RGBA 32-bit signed float format (`Float32Array`). */
18
+ R32G32B32A32_SFloat = 8,
19
+ /** RGBA 32-bit unsigned integer format (`Uint32Array`, `TextureFilterMode.Point` only). */
20
20
  R32G32B32A32_UInt = 9,
21
- /** RGB unsigned float format, 11 bits in R channel, 11 bits in G channel, 10 bits in B channel. */
21
+ /** Packed RGB 11-11-10 unsigned float format (`Float32Array`). `getPixelBuffer` outputs RGBA `Float32Array`. */
22
22
  R11G11B10_UFloat = 35,
23
- /** R float format, 8 bits. */
24
- R8 = 36,
25
- /** RG float format, 8 bits per channel. */
26
- R8G8 = 37,
27
- /** RGB compressed format, 4 bits per pixel. */
23
+ /** R 8-bit unsigned normalized format. */
24
+ R8_UNorm = 36,
25
+ /** RG 8-bit unsigned normalized format. */
26
+ R8G8_UNorm = 37,
27
+ /** R 16-bit unsigned normalized format (`Uint16Array`). `getPixelBuffer` outputs RGBA `Uint16Array`. */
28
+ R16_UNorm = 38,
29
+ /** R 16-bit signed float format (half-float `Uint16Array`). `getPixelBuffer` outputs RGBA `Float32Array`. */
30
+ R16_SFloat = 39,
31
+ /** RG 16-bit signed float format (half-float `Uint16Array`). `getPixelBuffer` outputs RGBA `Float32Array`. */
32
+ R16G16_SFloat = 40,
33
+ /** R 32-bit signed float format (`Float32Array`). `getPixelBuffer` outputs RGBA `Float32Array`. */
34
+ R32_SFloat = 41,
35
+ /** RG 32-bit signed float format (`Float32Array`). `getPixelBuffer` outputs RGBA `Float32Array`. */
36
+ R32G32_SFloat = 42,
37
+ /** RGB S3TC/DXT1 compressed format, 4 bits per pixel. */
28
38
  BC1 = 10,
29
- /** RGBA compressed format, 8 bits per pixel. */
39
+ /** RGBA S3TC/DXT5 compressed format, 8 bits per pixel. */
30
40
  BC3 = 11,
31
- /** RGB(A) compressed format, 128 bits per 4x4 pixel block. */
41
+ /** RGB(A) BPTC compressed format, 8 bits per pixel. */
32
42
  BC7 = 12,
33
- /** RGB HDR compressed format, 8 bits per pixel. */
43
+ /** RGB unsigned float HDR BPTC compressed format, 8 bits per pixel. */
34
44
  BC6H = 100,
35
- /** RGB compressed format, 4 bits per pixel. */
45
+ /** RGB ETC1 compressed format, 4 bits per pixel. */
36
46
  ETC1_RGB = 13,
37
- /** RGB compressed format, 4 bits per pixel. */
47
+ /** RGB ETC2 compressed format, 4 bits per pixel. */
38
48
  ETC2_RGB = 14,
39
- /** RGBA compressed format, 5 bits per pixel, 4 bit in RGB, 1 bit in A. */
49
+ /** RGBA ETC2 punchthrough-alpha compressed format, 4 bits per pixel. */
40
50
  ETC2_RGBA5 = 15,
41
- /** RGB compressed format, 8 bits per pixel. */
51
+ /** RGBA ETC2 EAC compressed format, 8 bits per pixel. */
42
52
  ETC2_RGBA8 = 16,
43
- /** RGB compressed format, 2 bits per pixel. */
53
+ /** RGB PVRTC compressed format, 2 bits per pixel. */
44
54
  PVRTC_RGB2 = 17,
45
- /** RGBA compressed format, 2 bits per pixel. */
55
+ /** RGBA PVRTC compressed format, 2 bits per pixel. */
46
56
  PVRTC_RGBA2 = 18,
47
- /** RGB compressed format, 4 bits per pixel. */
57
+ /** RGB PVRTC compressed format, 4 bits per pixel. */
48
58
  PVRTC_RGB4 = 19,
49
- /** RGBA compressed format, 4 bits per pixel. */
59
+ /** RGBA PVRTC compressed format, 4 bits per pixel. */
50
60
  PVRTC_RGBA4 = 20,
51
- /** RGB(A) compressed format, 128 bits per 4x4 pixel block. */
61
+ /** RGB(A) ASTC compressed format, 128 bits per 4x4 block. */
52
62
  ASTC_4x4 = 21,
53
- /** RGB(A) compressed format, 128 bits per 5x5 pixel block. */
63
+ /** RGB(A) ASTC compressed format, 128 bits per 5x5 block. */
54
64
  ASTC_5x5 = 22,
55
- /** RGB(A) compressed format, 128 bits per 6x6 pixel block. */
65
+ /** RGB(A) ASTC compressed format, 128 bits per 6x6 block. */
56
66
  ASTC_6x6 = 23,
57
- /** RGB(A) compressed format, 128 bits per 8x8 pixel block. */
67
+ /** RGB(A) ASTC compressed format, 128 bits per 8x8 block. */
58
68
  ASTC_8x8 = 24,
59
- /** RGB(A) compressed format, 128 bits per 10x10 pixel block. */
69
+ /** RGB(A) ASTC compressed format, 128 bits per 10x10 block. */
60
70
  ASTC_10x10 = 25,
61
- /** RGB(A) compressed format, 128 bits per 12x12 pixel block. */
71
+ /** RGB(A) ASTC compressed format, 128 bits per 12x12 block. */
62
72
  ASTC_12x12 = 26,
63
- /** Automatic depth format, engine will automatically select the supported precision. */
73
+ /** Default depth format (32-bit float depth). */
64
74
  Depth = 27,
65
- /** Render to stencil buffer. */
75
+ /** 8-bit stencil format (for `RenderTarget` only). */
66
76
  Stencil = 28,
67
- /** Automatic depth stencil format, engine will automatically select the supported precision. */
77
+ /** Default depth-stencil format (32-bit float depth + 8-bit stencil). */
68
78
  DepthStencil = 29,
69
- /** 16-bit depth format. */
79
+ /** 16-bit unsigned normalized depth format. */
70
80
  Depth16 = 30,
71
- /** 24-bit depth format. */
81
+ /** 24-bit unsigned normalized depth format. */
72
82
  Depth24 = 31,
73
- /** 32-bit depth format. */
83
+ /** 32-bit float depth format. */
74
84
  Depth32 = 32,
75
- /** 16-bit depth + 8-bit stencil format. */
85
+ /** 24-bit depth + 8-bit stencil format. */
76
86
  Depth24Stencil8 = 33,
77
- /** 32-bit depth + 8-bit stencil format. */
87
+ /** 32-bit float depth + 8-bit stencil format. */
78
88
  Depth32Stencil8 = 34
79
89
  }