@babylonjs/core 7.36.0 → 7.37.0
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/Collisions/gpuPicker.js.map +1 -1
- package/Engines/Extensions/engine.multiRender.js.map +1 -1
- package/Engines/Extensions/engine.rawTexture.d.ts +8 -8
- package/Engines/Extensions/engine.rawTexture.js.map +1 -1
- package/Engines/Extensions/engine.renderTarget.js.map +1 -1
- package/Engines/Extensions/engine.renderTargetCube.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.multiRender.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.rawTexture.d.ts +9 -9
- package/Engines/WebGPU/Extensions/engine.rawTexture.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.renderTargetCube.js.map +1 -1
- package/Engines/WebGPU/webgpuConstants.d.ts +6 -0
- package/Engines/WebGPU/webgpuConstants.js +6 -0
- package/Engines/WebGPU/webgpuConstants.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureHelper.js +18 -0
- package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureManager.js +6 -0
- package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
- package/Engines/abstractEngine.d.ts +1 -1
- package/Engines/abstractEngine.js +4 -4
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/constants.d.ts +17 -1
- package/Engines/constants.js +17 -1
- package/Engines/constants.js.map +1 -1
- package/Engines/engine.d.ts +31 -1
- package/Engines/engine.js +17 -1
- package/Engines/engine.js.map +1 -1
- package/Engines/engineCapabilities.d.ts +2 -0
- package/Engines/engineCapabilities.js.map +1 -1
- package/Engines/nativeEngine.js +1 -0
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/nullEngine.d.ts +2 -2
- package/Engines/nullEngine.js +3 -2
- package/Engines/nullEngine.js.map +1 -1
- package/Engines/thinEngine.functions.d.ts +4 -0
- package/Engines/thinEngine.functions.js +17 -0
- package/Engines/thinEngine.functions.js.map +1 -1
- package/Engines/thinEngine.js +39 -9
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.js +1 -0
- package/Engines/webgpuEngine.js.map +1 -1
- package/Helpers/environmentHelper.js.map +1 -1
- package/Layers/effectLayer.d.ts +1 -1
- package/Layers/effectLayer.js.map +1 -1
- package/Layers/glowLayer.d.ts +1 -1
- package/Layers/glowLayer.js.map +1 -1
- package/Layers/highlightLayer.d.ts +1 -1
- package/Layers/highlightLayer.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/Textures/MultiviewRenderTarget.js.map +1 -1
- package/Materials/Textures/Procedurals/proceduralTexture.js.map +1 -1
- package/Materials/Textures/baseTexture.js.map +1 -1
- package/Materials/Textures/colorGradingTexture.js.map +1 -1
- package/Materials/Textures/mirrorTexture.js.map +1 -1
- package/Materials/Textures/multiRenderTarget.js.map +1 -1
- package/Materials/Textures/rawCubeTexture.d.ts +2 -2
- package/Materials/Textures/rawCubeTexture.js +2 -2
- package/Materials/Textures/rawCubeTexture.js.map +1 -1
- package/Materials/Textures/rawTexture.js.map +1 -1
- package/Materials/Textures/rawTexture2DArray.d.ts +1 -1
- package/Materials/Textures/rawTexture2DArray.js +1 -1
- package/Materials/Textures/rawTexture2DArray.js.map +1 -1
- package/Materials/Textures/rawTexture3D.d.ts +1 -1
- package/Materials/Textures/rawTexture3D.js +1 -1
- package/Materials/Textures/rawTexture3D.js.map +1 -1
- package/Materials/Textures/renderTargetTexture.js.map +1 -1
- package/Materials/drawWrapper.d.ts +6 -1
- package/Materials/drawWrapper.js +18 -2
- package/Materials/drawWrapper.js.map +1 -1
- package/Materials/effect.d.ts +6 -1
- package/Materials/effect.functions.d.ts +5 -0
- package/Materials/effect.functions.js +19 -0
- package/Materials/effect.functions.js.map +1 -1
- package/Materials/effect.js +22 -20
- package/Materials/effect.js.map +1 -1
- package/Materials/effect.webgl.functions.js +12 -4
- package/Materials/effect.webgl.functions.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +2 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Meshes/abstractMesh.d.ts +5 -3
- package/Meshes/abstractMesh.js +9 -7
- package/Meshes/abstractMesh.js.map +1 -1
- package/Meshes/subMesh.d.ts +5 -3
- package/Meshes/subMesh.js +9 -7
- package/Meshes/subMesh.js.map +1 -1
- package/Misc/HighDynamicRange/cubemapToSphericalPolynomial.js.map +1 -1
- package/Misc/dds.d.ts +1 -1
- package/Misc/dds.js.map +1 -1
- package/Misc/environmentTextureTools.js.map +1 -1
- package/Misc/observable.d.ts +1 -3
- package/Misc/observable.js +7 -7
- package/Misc/observable.js.map +1 -1
- package/Misc/screenshotTools.js.map +1 -1
- package/Misc/snapshotRenderingHelper.js +3 -0
- package/Misc/snapshotRenderingHelper.js.map +1 -1
- package/Misc/textureTools.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.d.ts +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js.map +1 -1
- package/PostProcesses/bloomMergePostProcess.js.map +1 -1
- package/PostProcesses/blurPostProcess.js.map +1 -1
- package/PostProcesses/chromaticAberrationPostProcess.js.map +1 -1
- package/PostProcesses/circleOfConfusionPostProcess.js.map +1 -1
- package/PostProcesses/convolutionPostProcess.js.map +1 -1
- package/PostProcesses/depthOfFieldBlurPostProcess.js.map +1 -1
- package/PostProcesses/depthOfFieldMergePostProcess.js.map +1 -1
- package/PostProcesses/extractHighlightsPostProcess.js.map +1 -1
- package/PostProcesses/fxaaPostProcess.js.map +1 -1
- package/PostProcesses/grainPostProcess.js.map +1 -1
- package/PostProcesses/highlightsPostProcess.d.ts +1 -1
- package/PostProcesses/highlightsPostProcess.js +1 -1
- package/PostProcesses/highlightsPostProcess.js.map +1 -1
- package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
- package/PostProcesses/motionBlurPostProcess.js.map +1 -1
- package/PostProcesses/passPostProcess.js.map +1 -1
- package/PostProcesses/postProcess.d.ts +1 -1
- package/PostProcesses/postProcess.js.map +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.js.map +1 -1
- package/PostProcesses/screenSpaceReflectionPostProcess.js.map +1 -1
- package/PostProcesses/sharpenPostProcess.js.map +1 -1
- package/PostProcesses/subSurfaceScatteringPostProcess.js.map +1 -1
- package/PostProcesses/tonemapPostProcess.d.ts +1 -1
- package/PostProcesses/tonemapPostProcess.js +1 -1
- package/PostProcesses/tonemapPostProcess.js.map +1 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsImportanceSamplingRenderer.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsSpatialBlurPass.js.map +1 -1
- package/Rendering/prePassRenderer.js.map +1 -1
- package/package.json +1 -1
|
@@ -18,7 +18,7 @@ declare module "../../abstractEngine" {
|
|
|
18
18
|
* @param format defines the format of the data
|
|
19
19
|
* @param invertY defines if data must be stored with Y axis inverted
|
|
20
20
|
* @param compression defines the compression used (null by default)
|
|
21
|
-
* @param type defines the type fo the data (Engine.
|
|
21
|
+
* @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_BYTE by default)
|
|
22
22
|
* @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
|
|
23
23
|
*/
|
|
24
24
|
updateRawTexture(texture: Nullable<InternalTexture>, data: Nullable<ArrayBufferView>, format: number, invertY: boolean, compression: Nullable<string>, type: number, useSRGBBuffer: boolean): void;
|
|
@@ -27,7 +27,7 @@ declare module "../../abstractEngine" {
|
|
|
27
27
|
* @param data defines the array of data to use to create each face
|
|
28
28
|
* @param size defines the size of the textures
|
|
29
29
|
* @param format defines the format of the data
|
|
30
|
-
* @param type defines the type of the data (like Engine.
|
|
30
|
+
* @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_BYTE)
|
|
31
31
|
* @param generateMipMaps defines if the engine should generate the mip levels
|
|
32
32
|
* @param invertY defines if data must be stored with Y axis inverted
|
|
33
33
|
* @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)
|
|
@@ -40,7 +40,7 @@ declare module "../../abstractEngine" {
|
|
|
40
40
|
* @param texture defines the texture to update
|
|
41
41
|
* @param data defines the data to store
|
|
42
42
|
* @param format defines the data format
|
|
43
|
-
* @param type defines the type fo the data (Engine.
|
|
43
|
+
* @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_BYTE by default)
|
|
44
44
|
* @param invertY defines if data must be stored with Y axis inverted
|
|
45
45
|
*/
|
|
46
46
|
updateRawCubeTexture(texture: InternalTexture, data: ArrayBufferView[], format: number, type: number, invertY: boolean): void;
|
|
@@ -49,7 +49,7 @@ declare module "../../abstractEngine" {
|
|
|
49
49
|
* @param texture defines the texture to update
|
|
50
50
|
* @param data defines the data to store
|
|
51
51
|
* @param format defines the data format
|
|
52
|
-
* @param type defines the type fo the data (Engine.
|
|
52
|
+
* @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_BYTE by default)
|
|
53
53
|
* @param invertY defines if data must be stored with Y axis inverted
|
|
54
54
|
* @param compression defines the compression used (null by default)
|
|
55
55
|
*/
|
|
@@ -59,7 +59,7 @@ declare module "../../abstractEngine" {
|
|
|
59
59
|
* @param texture defines the texture to update
|
|
60
60
|
* @param data defines the data to store
|
|
61
61
|
* @param format defines the data format
|
|
62
|
-
* @param type defines the type fo the data (Engine.
|
|
62
|
+
* @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_BYTE by default)
|
|
63
63
|
* @param invertY defines if data must be stored with Y axis inverted
|
|
64
64
|
* @param compression defines the compression used (null by default)
|
|
65
65
|
* @param level defines which level of the texture to update
|
|
@@ -71,7 +71,7 @@ declare module "../../abstractEngine" {
|
|
|
71
71
|
* @param scene defines the current scene
|
|
72
72
|
* @param size defines the size of the textures
|
|
73
73
|
* @param format defines the format of the data
|
|
74
|
-
* @param type defines the type fo the data (like Engine.
|
|
74
|
+
* @param type defines the type fo the data (like Engine.TEXTURETYPE_UNSIGNED_BYTE)
|
|
75
75
|
* @param noMipmap defines if the engine should avoid generating the mip levels
|
|
76
76
|
* @param callback defines a callback used to extract texture data from loaded data
|
|
77
77
|
* @param mipmapGenerator defines to provide an optional tool to generate mip levels
|
|
@@ -86,7 +86,7 @@ declare module "../../abstractEngine" {
|
|
|
86
86
|
* @param scene defines the current scene
|
|
87
87
|
* @param size defines the size of the textures
|
|
88
88
|
* @param format defines the format of the data
|
|
89
|
-
* @param type defines the type fo the data (like Engine.
|
|
89
|
+
* @param type defines the type fo the data (like Engine.TEXTURETYPE_UNSIGNED_BYTE)
|
|
90
90
|
* @param noMipmap defines if the engine should avoid generating the mip levels
|
|
91
91
|
* @param callback defines a callback used to extract texture data from loaded data
|
|
92
92
|
* @param mipmapGenerator defines to provide an optional tool to generate mip levels
|
|
@@ -112,7 +112,7 @@ declare module "../../abstractEngine" {
|
|
|
112
112
|
* @param format defines the data format
|
|
113
113
|
* @param invertY defines if data must be stored with Y axis inverted
|
|
114
114
|
* @param compression defines the used compression (can be null)
|
|
115
|
-
* @param textureType defines the texture Type (Engine.
|
|
115
|
+
* @param textureType defines the texture Type (Engine.TEXTURETYPE_UNSIGNED_BYTE, Engine.TEXTURETYPE_FLOAT...)
|
|
116
116
|
*/
|
|
117
117
|
updateRawTexture3D(texture: InternalTexture, data: Nullable<ArrayBufferView>, format: number, invertY: boolean, compression: Nullable<string>, textureType: number): void;
|
|
118
118
|
/**
|
|
@@ -130,7 +130,7 @@ declare module "../../abstractEngine" {
|
|
|
130
130
|
* @param format defines the data format
|
|
131
131
|
* @param invertY defines if data must be stored with Y axis inverted
|
|
132
132
|
* @param compression defines the used compression (can be null)
|
|
133
|
-
* @param textureType defines the texture Type (Engine.
|
|
133
|
+
* @param textureType defines the texture Type (Engine.TEXTURETYPE_UNSIGNED_BYTE, Engine.TEXTURETYPE_FLOAT...)
|
|
134
134
|
*/
|
|
135
135
|
updateRawTexture2DArray(texture: InternalTexture, data: Nullable<ArrayBufferView>, format: number, invertY: boolean, compression: Nullable<string>, textureType: number): void;
|
|
136
136
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.rawTexture.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Engines/WebGPU/Extensions/engine.rawTexture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAyB,MAAM,6CAA6C,CAAC;AAGrG,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG9C,OAAO,EAAE,gBAAgB,EAAE,kCAAsC;AAoMjE,gBAAgB,CAAC,SAAS,CAAC,gBAAgB,GAAG,UAC1C,IAA+B,EAC/B,KAAa,EACb,MAAc,EACd,MAAc,EACd,eAAwB,EACxB,OAAgB,EAChB,YAAoB,EACpB,cAAgC,IAAI,EACpC,OAAe,SAAS,CAAC,wBAAwB,EACjD,gBAAwB,CAAC,EACzB,gBAAyB,KAAK;IAE9B,MAAM,OAAO,GAAG,IAAI,eAAe,CAAC,IAAI,oCAA4B,CAAC;IACrE,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC;IAC1B,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC;IAC5B,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;IACtB,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,MAAM,GAAG,MAAM,CA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G,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAC5C,QAAQ,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAC5C,QAAQ,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAE5C,kCAAkC;YAClC,QAAQ,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;QAClC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AACpB,CAAC","sourcesContent":["import { InternalTexture, InternalTextureSource } from \"../../../Materials/Textures/internalTexture\";\r\nimport type { IWebRequest } from \"../../../Misc/interfaces/iWebRequest\";\r\nimport type { Nullable } from \"../../../types\";\r\nimport { Constants } from \"../../constants\";\r\nimport type { WebGPUHardwareTexture } from \"../webgpuHardwareTexture\";\r\nimport { Logger } from \"../../../Misc/logger\";\r\n\r\nimport type { Scene } from \"../../../scene\";\r\nimport { ThinWebGPUEngine } from \"core/Engines/thinWebGPUEngine\";\r\n\r\ndeclare module \"../../abstractEngine\" {\r\n export interface AbstractEngine {\r\n /**\r\n * Update a raw texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store in the texture\r\n * @param format defines the format of the data\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n */\r\n updateRawTexture(texture: Nullable<InternalTexture>, data: Nullable<ArrayBufferView>, format: number, invertY: boolean): void;\r\n\r\n /**\r\n * Update a raw texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store in the texture\r\n * @param format defines the format of the data\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param compression defines the compression used (null by default)\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)\r\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\r\n */\r\n updateRawTexture(\r\n texture: Nullable<InternalTexture>,\r\n data: Nullable<ArrayBufferView>,\r\n format: number,\r\n invertY: boolean,\r\n compression: Nullable<string>,\r\n type: number,\r\n useSRGBBuffer: boolean\r\n ): void;\r\n\r\n /**\r\n * Creates a new raw cube texture\r\n * @param data defines the array of data to use to create each face\r\n * @param size defines the size of the textures\r\n * @param format defines the format of the data\r\n * @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_INT)\r\n * @param generateMipMaps defines if the engine should generate the mip levels\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\r\n * @param compression defines the compression used (null by default)\r\n * @returns the cube texture as an InternalTexture\r\n */\r\n createRawCubeTexture(\r\n data: Nullable<ArrayBufferView[]>,\r\n size: number,\r\n format: number,\r\n type: number,\r\n generateMipMaps: boolean,\r\n invertY: boolean,\r\n samplingMode: number,\r\n compression: Nullable<string>\r\n ): InternalTexture;\r\n\r\n /**\r\n * Update a raw cube texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n */\r\n updateRawCubeTexture(texture: InternalTexture, data: ArrayBufferView[], format: number, type: number, invertY: boolean): void;\r\n\r\n /**\r\n * Update a raw cube texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param compression defines the compression used (null by default)\r\n */\r\n updateRawCubeTexture(texture: InternalTexture, data: ArrayBufferView[], format: number, type: number, invertY: boolean, compression: Nullable<string>): void;\r\n\r\n /**\r\n * Update a raw cube texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param compression defines the compression used (null by default)\r\n * @param level defines which level of the texture to update\r\n */\r\n updateRawCubeTexture(texture: InternalTexture, data: ArrayBufferView[], format: number, type: number, invertY: boolean, compression: Nullable<string>, level: number): void;\r\n\r\n /**\r\n * Creates a new raw cube texture from a specified url\r\n * @param url defines the url where the data is located\r\n * @param scene defines the current scene\r\n * @param size defines the size of the textures\r\n * @param format defines the format of the data\r\n * @param type defines the type fo the data (like Engine.TEXTURETYPE_UNSIGNED_INT)\r\n * @param noMipmap defines if the engine should avoid generating the mip levels\r\n * @param callback defines a callback used to extract texture data from loaded data\r\n * @param mipmapGenerator defines to provide an optional tool to generate mip levels\r\n * @param onLoad defines a callback called when texture is loaded\r\n * @param onError defines a callback called if there is an error\r\n * @returns the cube texture as an InternalTexture\r\n */\r\n createRawCubeTextureFromUrl(\r\n url: string,\r\n scene: Nullable<Scene>,\r\n size: number,\r\n format: number,\r\n type: number,\r\n noMipmap: boolean,\r\n callback: (ArrayBuffer: ArrayBuffer) => Nullable<ArrayBufferView[]>,\r\n mipmapGenerator: Nullable<(faces: ArrayBufferView[]) => ArrayBufferView[][]>,\r\n onLoad: Nullable<() => void>,\r\n onError: Nullable<(message?: string, exception?: any) => void>\r\n ): InternalTexture;\r\n\r\n /**\r\n * Creates a new raw cube texture from a specified url\r\n * @param url defines the url where the data is located\r\n * @param scene defines the current scene\r\n * @param size defines the size of the textures\r\n * @param format defines the format of the data\r\n * @param type defines the type fo the data (like Engine.TEXTURETYPE_UNSIGNED_INT)\r\n * @param noMipmap defines if the engine should avoid generating the mip levels\r\n * @param callback defines a callback used to extract texture data from loaded data\r\n * @param mipmapGenerator defines to provide an optional tool to generate mip levels\r\n * @param onLoad defines a callback called when texture is loaded\r\n * @param onError defines a callback called if there is an error\r\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @returns the cube texture as an InternalTexture\r\n */\r\n createRawCubeTextureFromUrl(\r\n url: string,\r\n scene: Nullable<Scene>,\r\n size: number,\r\n format: number,\r\n type: number,\r\n noMipmap: boolean,\r\n callback: (ArrayBuffer: ArrayBuffer) => Nullable<ArrayBufferView[]>,\r\n mipmapGenerator: Nullable<(faces: ArrayBufferView[]) => ArrayBufferView[][]>,\r\n onLoad: Nullable<() => void>,\r\n onError: Nullable<(message?: string, exception?: any) => void>,\r\n samplingMode: number,\r\n invertY: boolean\r\n ): InternalTexture;\r\n\r\n /**\r\n * Update a raw 3D texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n */\r\n updateRawTexture3D(texture: InternalTexture, data: Nullable<ArrayBufferView>, format: number, invertY: boolean): void;\r\n\r\n /**\r\n * Update a raw 3D texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param compression defines the used compression (can be null)\r\n * @param textureType defines the texture Type (Engine.TEXTURETYPE_UNSIGNED_INT, Engine.TEXTURETYPE_FLOAT...)\r\n */\r\n updateRawTexture3D(texture: InternalTexture, data: Nullable<ArrayBufferView>, format: number, invertY: boolean, compression: Nullable<string>, textureType: number): void;\r\n\r\n /**\r\n * Update a raw 2D array texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n */\r\n updateRawTexture2DArray(texture: InternalTexture, data: Nullable<ArrayBufferView>, format: number, invertY: boolean): void;\r\n\r\n /**\r\n * Update a raw 2D array texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param compression defines the used compression (can be null)\r\n * @param textureType defines the texture Type (Engine.TEXTURETYPE_UNSIGNED_INT, Engine.TEXTURETYPE_FLOAT...)\r\n */\r\n updateRawTexture2DArray(\r\n texture: InternalTexture,\r\n data: Nullable<ArrayBufferView>,\r\n format: number,\r\n invertY: boolean,\r\n compression: Nullable<string>,\r\n textureType: number\r\n ): void;\r\n }\r\n}\r\n\r\nThinWebGPUEngine.prototype.createRawTexture = function (\r\n data: Nullable<ArrayBufferView>,\r\n width: number,\r\n height: number,\r\n format: number,\r\n generateMipMaps: boolean,\r\n invertY: boolean,\r\n samplingMode: number,\r\n compression: Nullable<string> = null,\r\n type: number = Constants.TEXTURETYPE_UNSIGNED_INT,\r\n creationFlags: number = 0,\r\n useSRGBBuffer: boolean = false\r\n): InternalTexture {\r\n const texture = new InternalTexture(this, InternalTextureSource.Raw);\r\n texture.baseWidth = width;\r\n texture.baseHeight = height;\r\n texture.width = width;\r\n texture.height = height;\r\n texture.format = format;\r\n texture.generateMipMaps = generateMipMaps;\r\n texture.samplingMode = samplingMode;\r\n texture.invertY = invertY;\r\n texture._compression = compression;\r\n texture.type = type;\r\n texture._creationFlags = creationFlags;\r\n texture._useSRGBBuffer = useSRGBBuffer;\r\n\r\n if (!this._doNotHandleContextLost) {\r\n texture._bufferView = data;\r\n }\r\n\r\n this._textureHelper.createGPUTextureForInternalTexture(texture, width, height, undefined, creationFlags);\r\n\r\n this.updateRawTexture(texture, data, format, invertY, compression, type, useSRGBBuffer);\r\n\r\n this._internalTexturesCache.push(texture);\r\n\r\n return texture;\r\n};\r\n\r\nThinWebGPUEngine.prototype.updateRawTexture = function (\r\n texture: Nullable<InternalTexture>,\r\n bufferView: Nullable<ArrayBufferView>,\r\n format: number,\r\n invertY: boolean,\r\n compression: Nullable<string> = null,\r\n type: number = Constants.TEXTURETYPE_UNSIGNED_INT,\r\n useSRGBBuffer: boolean = false\r\n): void {\r\n if (!texture) {\r\n return;\r\n }\r\n\r\n if (!this._doNotHandleContextLost) {\r\n texture._bufferView = bufferView;\r\n texture.invertY = invertY;\r\n texture._compression = compression;\r\n texture._useSRGBBuffer = useSRGBBuffer;\r\n }\r\n\r\n if (bufferView) {\r\n const gpuTextureWrapper = texture._hardwareTexture as WebGPUHardwareTexture;\r\n const needConversion = format === Constants.TEXTUREFORMAT_RGB;\r\n\r\n if (needConversion) {\r\n bufferView = _convertRGBtoRGBATextureData(bufferView, texture.width, texture.height, type);\r\n }\r\n\r\n const data = new Uint8Array(bufferView.buffer, bufferView.byteOffset, bufferView.byteLength);\r\n\r\n this._textureHelper.updateTexture(data, texture, texture.width, texture.height, texture.depth, gpuTextureWrapper.format, 0, 0, invertY, false, 0, 0);\r\n if (texture.generateMipMaps) {\r\n this._generateMipmaps(texture, this._uploadEncoder);\r\n }\r\n }\r\n\r\n texture.isReady = true;\r\n};\r\n\r\nThinWebGPUEngine.prototype.createRawCubeTexture = function (\r\n data: Nullable<ArrayBufferView[]>,\r\n size: number,\r\n format: number,\r\n type: number,\r\n generateMipMaps: boolean,\r\n invertY: boolean,\r\n samplingMode: number,\r\n compression: Nullable<string> = null\r\n): InternalTexture {\r\n const texture = new InternalTexture(this, InternalTextureSource.CubeRaw);\r\n\r\n if (type === Constants.TEXTURETYPE_FLOAT && !this._caps.textureFloatLinearFiltering) {\r\n generateMipMaps = false;\r\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\r\n Logger.Warn(\"Float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.\");\r\n } else if (type === Constants.TEXTURETYPE_HALF_FLOAT && !this._caps.textureHalfFloatLinearFiltering) {\r\n generateMipMaps = false;\r\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\r\n Logger.Warn(\"Half float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.\");\r\n } else if (type === Constants.TEXTURETYPE_FLOAT && !this._caps.textureFloatRender) {\r\n generateMipMaps = false;\r\n Logger.Warn(\"Render to float textures is not supported. Mipmap generation forced to false.\");\r\n } else if (type === Constants.TEXTURETYPE_HALF_FLOAT && !this._caps.colorBufferFloat) {\r\n generateMipMaps = false;\r\n Logger.Warn(\"Render to half float textures is not supported. Mipmap generation forced to false.\");\r\n }\r\n\r\n texture.isCube = true;\r\n texture._originalFormat = format;\r\n texture.format = format === Constants.TEXTUREFORMAT_RGB ? Constants.TEXTUREFORMAT_RGBA : format;\r\n texture.type = type;\r\n texture.generateMipMaps = generateMipMaps;\r\n texture.width = size;\r\n texture.height = size;\r\n texture.samplingMode = samplingMode;\r\n if (!this._doNotHandleContextLost) {\r\n texture._bufferViewArray = data;\r\n }\r\n texture.invertY = invertY;\r\n texture._compression = compression;\r\n texture._cachedWrapU = Constants.TEXTURE_CLAMP_ADDRESSMODE;\r\n texture._cachedWrapV = Constants.TEXTURE_CLAMP_ADDRESSMODE;\r\n\r\n this._textureHelper.createGPUTextureForInternalTexture(texture);\r\n\r\n if (format === Constants.TEXTUREFORMAT_RGB) {\r\n const gpuTextureWrapper = texture._hardwareTexture as WebGPUHardwareTexture;\r\n gpuTextureWrapper._originalFormatIsRGB = true;\r\n }\r\n\r\n if (data) {\r\n this.updateRawCubeTexture(texture, data, format, type, invertY, compression);\r\n }\r\n\r\n texture.isReady = true;\r\n\r\n return texture;\r\n};\r\n\r\nThinWebGPUEngine.prototype.updateRawCubeTexture = function (\r\n texture: InternalTexture,\r\n bufferView: ArrayBufferView[],\r\n _format: number,\r\n type: number,\r\n invertY: boolean,\r\n compression: Nullable<string> = null\r\n): void {\r\n texture._bufferViewArray = bufferView;\r\n texture.invertY = invertY;\r\n texture._compression = compression;\r\n\r\n const gpuTextureWrapper = texture._hardwareTexture as WebGPUHardwareTexture;\r\n const needConversion = gpuTextureWrapper._originalFormatIsRGB;\r\n\r\n const faces = [0, 2, 4, 1, 3, 5];\r\n\r\n const data = [];\r\n for (let i = 0; i < bufferView.length; ++i) {\r\n let faceData = bufferView[faces[i]];\r\n if (needConversion) {\r\n faceData = _convertRGBtoRGBATextureData(faceData, texture.width, texture.height, type);\r\n }\r\n data.push(new Uint8Array(faceData.buffer, faceData.byteOffset, faceData.byteLength));\r\n }\r\n\r\n this._textureHelper.updateCubeTextures(data, gpuTextureWrapper.underlyingResource!, texture.width, texture.height, gpuTextureWrapper.format, invertY, false, 0, 0);\r\n if (texture.generateMipMaps) {\r\n this._generateMipmaps(texture, this._uploadEncoder);\r\n }\r\n\r\n texture.isReady = true;\r\n};\r\n\r\nThinWebGPUEngine.prototype.createRawCubeTextureFromUrl = function (\r\n url: string,\r\n scene: Nullable<Scene>,\r\n size: number,\r\n format: number,\r\n type: number,\r\n noMipmap: boolean,\r\n callback: (ArrayBuffer: ArrayBuffer) => Nullable<ArrayBufferView[]>,\r\n mipmapGenerator: Nullable<(faces: ArrayBufferView[]) => ArrayBufferView[][]>,\r\n onLoad: Nullable<() => void> = null,\r\n onError: Nullable<(message?: string, exception?: any) => void> = null,\r\n samplingMode: number = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE,\r\n invertY: boolean = false\r\n): InternalTexture {\r\n const texture = this.createRawCubeTexture(null, size, format, type, !noMipmap, invertY, samplingMode, null);\r\n scene?.addPendingData(texture);\r\n texture.url = url;\r\n texture.isReady = false;\r\n\r\n this._internalTexturesCache.push(texture);\r\n\r\n const onerror = (request?: IWebRequest, exception?: any) => {\r\n scene?.removePendingData(texture);\r\n if (onError && request) {\r\n onError(request.status + \" \" + request.statusText, exception);\r\n }\r\n };\r\n\r\n const internalCallback = (data: any) => {\r\n const width = texture.width;\r\n const faceDataArrays = callback(data);\r\n\r\n if (!faceDataArrays) {\r\n return;\r\n }\r\n\r\n if (mipmapGenerator) {\r\n const needConversion = format === Constants.TEXTUREFORMAT_RGB;\r\n const mipData = mipmapGenerator(faceDataArrays);\r\n const gpuTextureWrapper = texture._hardwareTexture as WebGPUHardwareTexture;\r\n const faces = [0, 1, 2, 3, 4, 5];\r\n for (let level = 0; level < mipData.length; level++) {\r\n const mipSize = width >> level;\r\n const allFaces = [];\r\n for (let faceIndex = 0; faceIndex < 6; faceIndex++) {\r\n let mipFaceData = mipData[level][faces[faceIndex]];\r\n if (needConversion) {\r\n mipFaceData = _convertRGBtoRGBATextureData(mipFaceData, mipSize, mipSize, type);\r\n }\r\n allFaces.push(new Uint8Array(mipFaceData.buffer, mipFaceData.byteOffset, mipFaceData.byteLength));\r\n }\r\n this._textureHelper.updateCubeTextures(allFaces, gpuTextureWrapper.underlyingResource!, mipSize, mipSize, gpuTextureWrapper.format, invertY, false, 0, 0);\r\n }\r\n } else {\r\n this.updateRawCubeTexture(texture, faceDataArrays, format, type, invertY);\r\n }\r\n\r\n texture.isReady = true;\r\n scene?.removePendingData(texture);\r\n\r\n if (onLoad) {\r\n onLoad();\r\n }\r\n };\r\n\r\n this._loadFile(\r\n url,\r\n (data) => {\r\n internalCallback(data);\r\n },\r\n undefined,\r\n scene?.offlineProvider,\r\n true,\r\n onerror\r\n );\r\n\r\n return texture;\r\n};\r\n\r\nThinWebGPUEngine.prototype.createRawTexture3D = function (\r\n data: Nullable<ArrayBufferView>,\r\n width: number,\r\n height: number,\r\n depth: number,\r\n format: number,\r\n generateMipMaps: boolean,\r\n invertY: boolean,\r\n samplingMode: number,\r\n compression: Nullable<string> = null,\r\n textureType: number = Constants.TEXTURETYPE_UNSIGNED_INT,\r\n creationFlags: number = 0\r\n): InternalTexture {\r\n const source = InternalTextureSource.Raw3D;\r\n const texture = new InternalTexture(this, source);\r\n\r\n texture.baseWidth = width;\r\n texture.baseHeight = height;\r\n texture.baseDepth = depth;\r\n texture.width = width;\r\n texture.height = height;\r\n texture.depth = depth;\r\n texture.format = format;\r\n texture.type = textureType;\r\n texture.generateMipMaps = generateMipMaps;\r\n texture.samplingMode = samplingMode;\r\n texture.is3D = true;\r\n texture._creationFlags = creationFlags;\r\n\r\n if (!this._doNotHandleContextLost) {\r\n texture._bufferView = data;\r\n }\r\n\r\n this._textureHelper.createGPUTextureForInternalTexture(texture, width, height, undefined, creationFlags);\r\n\r\n this.updateRawTexture3D(texture, data, format, invertY, compression, textureType);\r\n\r\n this._internalTexturesCache.push(texture);\r\n\r\n return texture;\r\n};\r\n\r\nThinWebGPUEngine.prototype.updateRawTexture3D = function (\r\n texture: InternalTexture,\r\n bufferView: Nullable<ArrayBufferView>,\r\n format: number,\r\n invertY: boolean,\r\n compression: Nullable<string> = null,\r\n textureType: number = Constants.TEXTURETYPE_UNSIGNED_INT\r\n): void {\r\n if (!this._doNotHandleContextLost) {\r\n texture._bufferView = bufferView;\r\n texture.format = format;\r\n texture.invertY = invertY;\r\n texture._compression = compression;\r\n }\r\n\r\n if (bufferView) {\r\n const gpuTextureWrapper = texture._hardwareTexture as WebGPUHardwareTexture;\r\n const needConversion = format === Constants.TEXTUREFORMAT_RGB;\r\n\r\n if (needConversion) {\r\n bufferView = _convertRGBtoRGBATextureData(bufferView, texture.width, texture.height, textureType);\r\n }\r\n\r\n const data = new Uint8Array(bufferView.buffer, bufferView.byteOffset, bufferView.byteLength);\r\n\r\n this._textureHelper.updateTexture(data, texture, texture.width, texture.height, texture.depth, gpuTextureWrapper.format, 0, 0, invertY, false, 0, 0);\r\n if (texture.generateMipMaps) {\r\n this._generateMipmaps(texture, this._uploadEncoder);\r\n }\r\n }\r\n\r\n texture.isReady = true;\r\n};\r\n\r\nThinWebGPUEngine.prototype.createRawTexture2DArray = function (\r\n data: Nullable<ArrayBufferView>,\r\n width: number,\r\n height: number,\r\n depth: number,\r\n format: number,\r\n generateMipMaps: boolean,\r\n invertY: boolean,\r\n samplingMode: number,\r\n compression: Nullable<string> = null,\r\n textureType: number = Constants.TEXTURETYPE_UNSIGNED_INT,\r\n creationFlags: number = 0\r\n): InternalTexture {\r\n const source = InternalTextureSource.Raw2DArray;\r\n const texture = new InternalTexture(this, source);\r\n\r\n texture.baseWidth = width;\r\n texture.baseHeight = height;\r\n texture.baseDepth = depth;\r\n texture.width = width;\r\n texture.height = height;\r\n texture.depth = depth;\r\n texture.format = format;\r\n texture.type = textureType;\r\n texture.generateMipMaps = generateMipMaps;\r\n texture.samplingMode = samplingMode;\r\n texture.is2DArray = true;\r\n texture._creationFlags = creationFlags;\r\n\r\n if (!this._doNotHandleContextLost) {\r\n texture._bufferView = data;\r\n }\r\n\r\n this._textureHelper.createGPUTextureForInternalTexture(texture, width, height, depth, creationFlags);\r\n\r\n this.updateRawTexture2DArray(texture, data, format, invertY, compression, textureType);\r\n\r\n this._internalTexturesCache.push(texture);\r\n\r\n return texture;\r\n};\r\n\r\nThinWebGPUEngine.prototype.updateRawTexture2DArray = function (\r\n texture: InternalTexture,\r\n bufferView: Nullable<ArrayBufferView>,\r\n format: number,\r\n invertY: boolean,\r\n compression: Nullable<string> = null,\r\n textureType: number = Constants.TEXTURETYPE_UNSIGNED_INT\r\n): void {\r\n if (!this._doNotHandleContextLost) {\r\n texture._bufferView = bufferView;\r\n texture.format = format;\r\n texture.invertY = invertY;\r\n texture._compression = compression;\r\n }\r\n\r\n if (bufferView) {\r\n const gpuTextureWrapper = texture._hardwareTexture as WebGPUHardwareTexture;\r\n const needConversion = format === Constants.TEXTUREFORMAT_RGB;\r\n\r\n if (needConversion) {\r\n bufferView = _convertRGBtoRGBATextureData(bufferView, texture.width, texture.height, textureType);\r\n }\r\n\r\n const data = new Uint8Array(bufferView.buffer, bufferView.byteOffset, bufferView.byteLength);\r\n\r\n this._textureHelper.updateTexture(data, texture, texture.width, texture.height, texture.depth, gpuTextureWrapper.format, 0, 0, invertY, false, 0, 0);\r\n if (texture.generateMipMaps) {\r\n this._generateMipmaps(texture, this._uploadEncoder);\r\n }\r\n }\r\n\r\n texture.isReady = true;\r\n};\r\n\r\n/**\r\n * @internal\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nfunction _convertRGBtoRGBATextureData(rgbData: any, width: number, height: number, textureType: number): ArrayBufferView {\r\n // Create new RGBA data container.\r\n let rgbaData: any;\r\n let val1 = 1;\r\n if (textureType === Constants.TEXTURETYPE_FLOAT) {\r\n rgbaData = new Float32Array(width * height * 4);\r\n } else if (textureType === Constants.TEXTURETYPE_HALF_FLOAT) {\r\n rgbaData = new Uint16Array(width * height * 4);\r\n val1 = 15360; // 15360 is the encoding of 1 in half float\r\n } else if (textureType === Constants.TEXTURETYPE_UNSIGNED_INTEGER) {\r\n rgbaData = new Uint32Array(width * height * 4);\r\n } else {\r\n rgbaData = new Uint8Array(width * height * 4);\r\n }\r\n\r\n // Convert each pixel.\r\n for (let x = 0; x < width; x++) {\r\n for (let y = 0; y < height; y++) {\r\n const index = (y * width + x) * 3;\r\n const newIndex = (y * width + x) * 4;\r\n\r\n // Map Old Value to new value.\r\n rgbaData[newIndex + 0] = rgbData[index + 0];\r\n rgbaData[newIndex + 1] = rgbData[index + 1];\r\n rgbaData[newIndex + 2] = rgbData[index + 2];\r\n\r\n // Add fully opaque alpha channel.\r\n rgbaData[newIndex + 3] = val1;\r\n }\r\n }\r\n\r\n return rgbaData;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"engine.rawTexture.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Engines/WebGPU/Extensions/engine.rawTexture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAyB,MAAM,6CAA6C,CAAC;AAGrG,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG9C,OAAO,EAAE,gBAAgB,EAAE,kCAAsC;AAoMjE,gBAAgB,CAAC,SAAS,CAAC,gBAAgB,GAAG,UAC1C,IAA+B,EAC/B,KAAa,EACb,MAAc,EACd,MAAc,EACd,eAAwB,EACxB,OAAgB,EAChB,YAAoB,EACpB,cAAgC,IAAI,EACpC,OAAe,SAAS,CAAC,yBAAyB,EAClD,gBAAwB,CAAC,EACzB,gBAAyB,KAAK;IAE9B,MAAM,OAAO,GAAG,IAAI,eAAe,CAAC,IAAI,oCAA4B,CAAC;IACrE,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC;IAC1B,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC;IAC5B,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;IACtB,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,CAAC,CAAC;YAErC,8BAA8B;YAC9B,QAAQ,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAC5C,QAAQ,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAC5C,QAAQ,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAE5C,kCAAkC;YAClC,QAAQ,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;QAClC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AACpB,CAAC","sourcesContent":["import { InternalTexture, InternalTextureSource } from \"../../../Materials/Textures/internalTexture\";\r\nimport type { IWebRequest } from \"../../../Misc/interfaces/iWebRequest\";\r\nimport type { Nullable } from \"../../../types\";\r\nimport { Constants } from \"../../constants\";\r\nimport type { WebGPUHardwareTexture } from \"../webgpuHardwareTexture\";\r\nimport { Logger } from \"../../../Misc/logger\";\r\n\r\nimport type { Scene } from \"../../../scene\";\r\nimport { ThinWebGPUEngine } from \"core/Engines/thinWebGPUEngine\";\r\n\r\ndeclare module \"../../abstractEngine\" {\r\n export interface AbstractEngine {\r\n /**\r\n * Update a raw texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store in the texture\r\n * @param format defines the format of the data\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n */\r\n updateRawTexture(texture: Nullable<InternalTexture>, data: Nullable<ArrayBufferView>, format: number, invertY: boolean): void;\r\n\r\n /**\r\n * Update a raw texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store in the texture\r\n * @param format defines the format of the data\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param compression defines the compression used (null by default)\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_BYTE by default)\r\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\r\n */\r\n updateRawTexture(\r\n texture: Nullable<InternalTexture>,\r\n data: Nullable<ArrayBufferView>,\r\n format: number,\r\n invertY: boolean,\r\n compression: Nullable<string>,\r\n type: number,\r\n useSRGBBuffer: boolean\r\n ): void;\r\n\r\n /**\r\n * Creates a new raw cube texture\r\n * @param data defines the array of data to use to create each face\r\n * @param size defines the size of the textures\r\n * @param format defines the format of the data\r\n * @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_BYTE)\r\n * @param generateMipMaps defines if the engine should generate the mip levels\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\r\n * @param compression defines the compression used (null by default)\r\n * @returns the cube texture as an InternalTexture\r\n */\r\n createRawCubeTexture(\r\n data: Nullable<ArrayBufferView[]>,\r\n size: number,\r\n format: number,\r\n type: number,\r\n generateMipMaps: boolean,\r\n invertY: boolean,\r\n samplingMode: number,\r\n compression: Nullable<string>\r\n ): InternalTexture;\r\n\r\n /**\r\n * Update a raw cube texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_BYTE by default)\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n */\r\n updateRawCubeTexture(texture: InternalTexture, data: ArrayBufferView[], format: number, type: number, invertY: boolean): void;\r\n\r\n /**\r\n * Update a raw cube texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_BYTE by default)\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param compression defines the compression used (null by default)\r\n */\r\n updateRawCubeTexture(texture: InternalTexture, data: ArrayBufferView[], format: number, type: number, invertY: boolean, compression: Nullable<string>): void;\r\n\r\n /**\r\n * Update a raw cube texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_BYTE by default)\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param compression defines the compression used (null by default)\r\n * @param level defines which level of the texture to update\r\n */\r\n updateRawCubeTexture(texture: InternalTexture, data: ArrayBufferView[], format: number, type: number, invertY: boolean, compression: Nullable<string>, level: number): void;\r\n\r\n /**\r\n * Creates a new raw cube texture from a specified url\r\n * @param url defines the url where the data is located\r\n * @param scene defines the current scene\r\n * @param size defines the size of the textures\r\n * @param format defines the format of the data\r\n * @param type defines the type fo the data (like Engine.TEXTURETYPE_UNSIGNED_BYTE)\r\n * @param noMipmap defines if the engine should avoid generating the mip levels\r\n * @param callback defines a callback used to extract texture data from loaded data\r\n * @param mipmapGenerator defines to provide an optional tool to generate mip levels\r\n * @param onLoad defines a callback called when texture is loaded\r\n * @param onError defines a callback called if there is an error\r\n * @returns the cube texture as an InternalTexture\r\n */\r\n createRawCubeTextureFromUrl(\r\n url: string,\r\n scene: Nullable<Scene>,\r\n size: number,\r\n format: number,\r\n type: number,\r\n noMipmap: boolean,\r\n callback: (ArrayBuffer: ArrayBuffer) => Nullable<ArrayBufferView[]>,\r\n mipmapGenerator: Nullable<(faces: ArrayBufferView[]) => ArrayBufferView[][]>,\r\n onLoad: Nullable<() => void>,\r\n onError: Nullable<(message?: string, exception?: any) => void>\r\n ): InternalTexture;\r\n\r\n /**\r\n * Creates a new raw cube texture from a specified url\r\n * @param url defines the url where the data is located\r\n * @param scene defines the current scene\r\n * @param size defines the size of the textures\r\n * @param format defines the format of the data\r\n * @param type defines the type fo the data (like Engine.TEXTURETYPE_UNSIGNED_BYTE)\r\n * @param noMipmap defines if the engine should avoid generating the mip levels\r\n * @param callback defines a callback used to extract texture data from loaded data\r\n * @param mipmapGenerator defines to provide an optional tool to generate mip levels\r\n * @param onLoad defines a callback called when texture is loaded\r\n * @param onError defines a callback called if there is an error\r\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @returns the cube texture as an InternalTexture\r\n */\r\n createRawCubeTextureFromUrl(\r\n url: string,\r\n scene: Nullable<Scene>,\r\n size: number,\r\n format: number,\r\n type: number,\r\n noMipmap: boolean,\r\n callback: (ArrayBuffer: ArrayBuffer) => Nullable<ArrayBufferView[]>,\r\n mipmapGenerator: Nullable<(faces: ArrayBufferView[]) => ArrayBufferView[][]>,\r\n onLoad: Nullable<() => void>,\r\n onError: Nullable<(message?: string, exception?: any) => void>,\r\n samplingMode: number,\r\n invertY: boolean\r\n ): InternalTexture;\r\n\r\n /**\r\n * Update a raw 3D texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n */\r\n updateRawTexture3D(texture: InternalTexture, data: Nullable<ArrayBufferView>, format: number, invertY: boolean): void;\r\n\r\n /**\r\n * Update a raw 3D texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param compression defines the used compression (can be null)\r\n * @param textureType defines the texture Type (Engine.TEXTURETYPE_UNSIGNED_BYTE, Engine.TEXTURETYPE_FLOAT...)\r\n */\r\n updateRawTexture3D(texture: InternalTexture, data: Nullable<ArrayBufferView>, format: number, invertY: boolean, compression: Nullable<string>, textureType: number): void;\r\n\r\n /**\r\n * Update a raw 2D array texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n */\r\n updateRawTexture2DArray(texture: InternalTexture, data: Nullable<ArrayBufferView>, format: number, invertY: boolean): void;\r\n\r\n /**\r\n * Update a raw 2D array texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param compression defines the used compression (can be null)\r\n * @param textureType defines the texture Type (Engine.TEXTURETYPE_UNSIGNED_BYTE, Engine.TEXTURETYPE_FLOAT...)\r\n */\r\n updateRawTexture2DArray(\r\n texture: InternalTexture,\r\n data: Nullable<ArrayBufferView>,\r\n format: number,\r\n invertY: boolean,\r\n compression: Nullable<string>,\r\n textureType: number\r\n ): void;\r\n }\r\n}\r\n\r\nThinWebGPUEngine.prototype.createRawTexture = function (\r\n data: Nullable<ArrayBufferView>,\r\n width: number,\r\n height: number,\r\n format: number,\r\n generateMipMaps: boolean,\r\n invertY: boolean,\r\n samplingMode: number,\r\n compression: Nullable<string> = null,\r\n type: number = Constants.TEXTURETYPE_UNSIGNED_BYTE,\r\n creationFlags: number = 0,\r\n useSRGBBuffer: boolean = false\r\n): InternalTexture {\r\n const texture = new InternalTexture(this, InternalTextureSource.Raw);\r\n texture.baseWidth = width;\r\n texture.baseHeight = height;\r\n texture.width = width;\r\n texture.height = height;\r\n texture.format = format;\r\n texture.generateMipMaps = generateMipMaps;\r\n texture.samplingMode = samplingMode;\r\n texture.invertY = invertY;\r\n texture._compression = compression;\r\n texture.type = type;\r\n texture._creationFlags = creationFlags;\r\n texture._useSRGBBuffer = useSRGBBuffer;\r\n\r\n if (!this._doNotHandleContextLost) {\r\n texture._bufferView = data;\r\n }\r\n\r\n this._textureHelper.createGPUTextureForInternalTexture(texture, width, height, undefined, creationFlags);\r\n\r\n this.updateRawTexture(texture, data, format, invertY, compression, type, useSRGBBuffer);\r\n\r\n this._internalTexturesCache.push(texture);\r\n\r\n return texture;\r\n};\r\n\r\nThinWebGPUEngine.prototype.updateRawTexture = function (\r\n texture: Nullable<InternalTexture>,\r\n bufferView: Nullable<ArrayBufferView>,\r\n format: number,\r\n invertY: boolean,\r\n compression: Nullable<string> = null,\r\n type: number = Constants.TEXTURETYPE_UNSIGNED_BYTE,\r\n useSRGBBuffer: boolean = false\r\n): void {\r\n if (!texture) {\r\n return;\r\n }\r\n\r\n if (!this._doNotHandleContextLost) {\r\n texture._bufferView = bufferView;\r\n texture.invertY = invertY;\r\n texture._compression = compression;\r\n texture._useSRGBBuffer = useSRGBBuffer;\r\n }\r\n\r\n if (bufferView) {\r\n const gpuTextureWrapper = texture._hardwareTexture as WebGPUHardwareTexture;\r\n const needConversion = format === Constants.TEXTUREFORMAT_RGB;\r\n\r\n if (needConversion) {\r\n bufferView = _convertRGBtoRGBATextureData(bufferView, texture.width, texture.height, type);\r\n }\r\n\r\n const data = new Uint8Array(bufferView.buffer, bufferView.byteOffset, bufferView.byteLength);\r\n\r\n this._textureHelper.updateTexture(data, texture, texture.width, texture.height, texture.depth, gpuTextureWrapper.format, 0, 0, invertY, false, 0, 0);\r\n if (texture.generateMipMaps) {\r\n this._generateMipmaps(texture, this._uploadEncoder);\r\n }\r\n }\r\n\r\n texture.isReady = true;\r\n};\r\n\r\nThinWebGPUEngine.prototype.createRawCubeTexture = function (\r\n data: Nullable<ArrayBufferView[]>,\r\n size: number,\r\n format: number,\r\n type: number,\r\n generateMipMaps: boolean,\r\n invertY: boolean,\r\n samplingMode: number,\r\n compression: Nullable<string> = null\r\n): InternalTexture {\r\n const texture = new InternalTexture(this, InternalTextureSource.CubeRaw);\r\n\r\n if (type === Constants.TEXTURETYPE_FLOAT && !this._caps.textureFloatLinearFiltering) {\r\n generateMipMaps = false;\r\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\r\n Logger.Warn(\"Float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.\");\r\n } else if (type === Constants.TEXTURETYPE_HALF_FLOAT && !this._caps.textureHalfFloatLinearFiltering) {\r\n generateMipMaps = false;\r\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\r\n Logger.Warn(\"Half float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.\");\r\n } else if (type === Constants.TEXTURETYPE_FLOAT && !this._caps.textureFloatRender) {\r\n generateMipMaps = false;\r\n Logger.Warn(\"Render to float textures is not supported. Mipmap generation forced to false.\");\r\n } else if (type === Constants.TEXTURETYPE_HALF_FLOAT && !this._caps.colorBufferFloat) {\r\n generateMipMaps = false;\r\n Logger.Warn(\"Render to half float textures is not supported. Mipmap generation forced to false.\");\r\n }\r\n\r\n texture.isCube = true;\r\n texture._originalFormat = format;\r\n texture.format = format === Constants.TEXTUREFORMAT_RGB ? Constants.TEXTUREFORMAT_RGBA : format;\r\n texture.type = type;\r\n texture.generateMipMaps = generateMipMaps;\r\n texture.width = size;\r\n texture.height = size;\r\n texture.samplingMode = samplingMode;\r\n if (!this._doNotHandleContextLost) {\r\n texture._bufferViewArray = data;\r\n }\r\n texture.invertY = invertY;\r\n texture._compression = compression;\r\n texture._cachedWrapU = Constants.TEXTURE_CLAMP_ADDRESSMODE;\r\n texture._cachedWrapV = Constants.TEXTURE_CLAMP_ADDRESSMODE;\r\n\r\n this._textureHelper.createGPUTextureForInternalTexture(texture);\r\n\r\n if (format === Constants.TEXTUREFORMAT_RGB) {\r\n const gpuTextureWrapper = texture._hardwareTexture as WebGPUHardwareTexture;\r\n gpuTextureWrapper._originalFormatIsRGB = true;\r\n }\r\n\r\n if (data) {\r\n this.updateRawCubeTexture(texture, data, format, type, invertY, compression);\r\n }\r\n\r\n texture.isReady = true;\r\n\r\n return texture;\r\n};\r\n\r\nThinWebGPUEngine.prototype.updateRawCubeTexture = function (\r\n texture: InternalTexture,\r\n bufferView: ArrayBufferView[],\r\n _format: number,\r\n type: number,\r\n invertY: boolean,\r\n compression: Nullable<string> = null\r\n): void {\r\n texture._bufferViewArray = bufferView;\r\n texture.invertY = invertY;\r\n texture._compression = compression;\r\n\r\n const gpuTextureWrapper = texture._hardwareTexture as WebGPUHardwareTexture;\r\n const needConversion = gpuTextureWrapper._originalFormatIsRGB;\r\n\r\n const faces = [0, 2, 4, 1, 3, 5];\r\n\r\n const data = [];\r\n for (let i = 0; i < bufferView.length; ++i) {\r\n let faceData = bufferView[faces[i]];\r\n if (needConversion) {\r\n faceData = _convertRGBtoRGBATextureData(faceData, texture.width, texture.height, type);\r\n }\r\n data.push(new Uint8Array(faceData.buffer, faceData.byteOffset, faceData.byteLength));\r\n }\r\n\r\n this._textureHelper.updateCubeTextures(data, gpuTextureWrapper.underlyingResource!, texture.width, texture.height, gpuTextureWrapper.format, invertY, false, 0, 0);\r\n if (texture.generateMipMaps) {\r\n this._generateMipmaps(texture, this._uploadEncoder);\r\n }\r\n\r\n texture.isReady = true;\r\n};\r\n\r\nThinWebGPUEngine.prototype.createRawCubeTextureFromUrl = function (\r\n url: string,\r\n scene: Nullable<Scene>,\r\n size: number,\r\n format: number,\r\n type: number,\r\n noMipmap: boolean,\r\n callback: (ArrayBuffer: ArrayBuffer) => Nullable<ArrayBufferView[]>,\r\n mipmapGenerator: Nullable<(faces: ArrayBufferView[]) => ArrayBufferView[][]>,\r\n onLoad: Nullable<() => void> = null,\r\n onError: Nullable<(message?: string, exception?: any) => void> = null,\r\n samplingMode: number = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE,\r\n invertY: boolean = false\r\n): InternalTexture {\r\n const texture = this.createRawCubeTexture(null, size, format, type, !noMipmap, invertY, samplingMode, null);\r\n scene?.addPendingData(texture);\r\n texture.url = url;\r\n texture.isReady = false;\r\n\r\n this._internalTexturesCache.push(texture);\r\n\r\n const onerror = (request?: IWebRequest, exception?: any) => {\r\n scene?.removePendingData(texture);\r\n if (onError && request) {\r\n onError(request.status + \" \" + request.statusText, exception);\r\n }\r\n };\r\n\r\n const internalCallback = (data: any) => {\r\n const width = texture.width;\r\n const faceDataArrays = callback(data);\r\n\r\n if (!faceDataArrays) {\r\n return;\r\n }\r\n\r\n if (mipmapGenerator) {\r\n const needConversion = format === Constants.TEXTUREFORMAT_RGB;\r\n const mipData = mipmapGenerator(faceDataArrays);\r\n const gpuTextureWrapper = texture._hardwareTexture as WebGPUHardwareTexture;\r\n const faces = [0, 1, 2, 3, 4, 5];\r\n for (let level = 0; level < mipData.length; level++) {\r\n const mipSize = width >> level;\r\n const allFaces = [];\r\n for (let faceIndex = 0; faceIndex < 6; faceIndex++) {\r\n let mipFaceData = mipData[level][faces[faceIndex]];\r\n if (needConversion) {\r\n mipFaceData = _convertRGBtoRGBATextureData(mipFaceData, mipSize, mipSize, type);\r\n }\r\n allFaces.push(new Uint8Array(mipFaceData.buffer, mipFaceData.byteOffset, mipFaceData.byteLength));\r\n }\r\n this._textureHelper.updateCubeTextures(allFaces, gpuTextureWrapper.underlyingResource!, mipSize, mipSize, gpuTextureWrapper.format, invertY, false, 0, 0);\r\n }\r\n } else {\r\n this.updateRawCubeTexture(texture, faceDataArrays, format, type, invertY);\r\n }\r\n\r\n texture.isReady = true;\r\n scene?.removePendingData(texture);\r\n\r\n if (onLoad) {\r\n onLoad();\r\n }\r\n };\r\n\r\n this._loadFile(\r\n url,\r\n (data) => {\r\n internalCallback(data);\r\n },\r\n undefined,\r\n scene?.offlineProvider,\r\n true,\r\n onerror\r\n );\r\n\r\n return texture;\r\n};\r\n\r\nThinWebGPUEngine.prototype.createRawTexture3D = function (\r\n data: Nullable<ArrayBufferView>,\r\n width: number,\r\n height: number,\r\n depth: number,\r\n format: number,\r\n generateMipMaps: boolean,\r\n invertY: boolean,\r\n samplingMode: number,\r\n compression: Nullable<string> = null,\r\n textureType: number = Constants.TEXTURETYPE_UNSIGNED_BYTE,\r\n creationFlags: number = 0\r\n): InternalTexture {\r\n const source = InternalTextureSource.Raw3D;\r\n const texture = new InternalTexture(this, source);\r\n\r\n texture.baseWidth = width;\r\n texture.baseHeight = height;\r\n texture.baseDepth = depth;\r\n texture.width = width;\r\n texture.height = height;\r\n texture.depth = depth;\r\n texture.format = format;\r\n texture.type = textureType;\r\n texture.generateMipMaps = generateMipMaps;\r\n texture.samplingMode = samplingMode;\r\n texture.is3D = true;\r\n texture._creationFlags = creationFlags;\r\n\r\n if (!this._doNotHandleContextLost) {\r\n texture._bufferView = data;\r\n }\r\n\r\n this._textureHelper.createGPUTextureForInternalTexture(texture, width, height, undefined, creationFlags);\r\n\r\n this.updateRawTexture3D(texture, data, format, invertY, compression, textureType);\r\n\r\n this._internalTexturesCache.push(texture);\r\n\r\n return texture;\r\n};\r\n\r\nThinWebGPUEngine.prototype.updateRawTexture3D = function (\r\n texture: InternalTexture,\r\n bufferView: Nullable<ArrayBufferView>,\r\n format: number,\r\n invertY: boolean,\r\n compression: Nullable<string> = null,\r\n textureType: number = Constants.TEXTURETYPE_UNSIGNED_BYTE\r\n): void {\r\n if (!this._doNotHandleContextLost) {\r\n texture._bufferView = bufferView;\r\n texture.format = format;\r\n texture.invertY = invertY;\r\n texture._compression = compression;\r\n }\r\n\r\n if (bufferView) {\r\n const gpuTextureWrapper = texture._hardwareTexture as WebGPUHardwareTexture;\r\n const needConversion = format === Constants.TEXTUREFORMAT_RGB;\r\n\r\n if (needConversion) {\r\n bufferView = _convertRGBtoRGBATextureData(bufferView, texture.width, texture.height, textureType);\r\n }\r\n\r\n const data = new Uint8Array(bufferView.buffer, bufferView.byteOffset, bufferView.byteLength);\r\n\r\n this._textureHelper.updateTexture(data, texture, texture.width, texture.height, texture.depth, gpuTextureWrapper.format, 0, 0, invertY, false, 0, 0);\r\n if (texture.generateMipMaps) {\r\n this._generateMipmaps(texture, this._uploadEncoder);\r\n }\r\n }\r\n\r\n texture.isReady = true;\r\n};\r\n\r\nThinWebGPUEngine.prototype.createRawTexture2DArray = function (\r\n data: Nullable<ArrayBufferView>,\r\n width: number,\r\n height: number,\r\n depth: number,\r\n format: number,\r\n generateMipMaps: boolean,\r\n invertY: boolean,\r\n samplingMode: number,\r\n compression: Nullable<string> = null,\r\n textureType: number = Constants.TEXTURETYPE_UNSIGNED_BYTE,\r\n creationFlags: number = 0\r\n): InternalTexture {\r\n const source = InternalTextureSource.Raw2DArray;\r\n const texture = new InternalTexture(this, source);\r\n\r\n texture.baseWidth = width;\r\n texture.baseHeight = height;\r\n texture.baseDepth = depth;\r\n texture.width = width;\r\n texture.height = height;\r\n texture.depth = depth;\r\n texture.format = format;\r\n texture.type = textureType;\r\n texture.generateMipMaps = generateMipMaps;\r\n texture.samplingMode = samplingMode;\r\n texture.is2DArray = true;\r\n texture._creationFlags = creationFlags;\r\n\r\n if (!this._doNotHandleContextLost) {\r\n texture._bufferView = data;\r\n }\r\n\r\n this._textureHelper.createGPUTextureForInternalTexture(texture, width, height, depth, creationFlags);\r\n\r\n this.updateRawTexture2DArray(texture, data, format, invertY, compression, textureType);\r\n\r\n this._internalTexturesCache.push(texture);\r\n\r\n return texture;\r\n};\r\n\r\nThinWebGPUEngine.prototype.updateRawTexture2DArray = function (\r\n texture: InternalTexture,\r\n bufferView: Nullable<ArrayBufferView>,\r\n format: number,\r\n invertY: boolean,\r\n compression: Nullable<string> = null,\r\n textureType: number = Constants.TEXTURETYPE_UNSIGNED_BYTE\r\n): void {\r\n if (!this._doNotHandleContextLost) {\r\n texture._bufferView = bufferView;\r\n texture.format = format;\r\n texture.invertY = invertY;\r\n texture._compression = compression;\r\n }\r\n\r\n if (bufferView) {\r\n const gpuTextureWrapper = texture._hardwareTexture as WebGPUHardwareTexture;\r\n const needConversion = format === Constants.TEXTUREFORMAT_RGB;\r\n\r\n if (needConversion) {\r\n bufferView = _convertRGBtoRGBATextureData(bufferView, texture.width, texture.height, textureType);\r\n }\r\n\r\n const data = new Uint8Array(bufferView.buffer, bufferView.byteOffset, bufferView.byteLength);\r\n\r\n this._textureHelper.updateTexture(data, texture, texture.width, texture.height, texture.depth, gpuTextureWrapper.format, 0, 0, invertY, false, 0, 0);\r\n if (texture.generateMipMaps) {\r\n this._generateMipmaps(texture, this._uploadEncoder);\r\n }\r\n }\r\n\r\n texture.isReady = true;\r\n};\r\n\r\n/**\r\n * @internal\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nfunction _convertRGBtoRGBATextureData(rgbData: any, width: number, height: number, textureType: number): ArrayBufferView {\r\n // Create new RGBA data container.\r\n let rgbaData: any;\r\n let val1 = 1;\r\n if (textureType === Constants.TEXTURETYPE_FLOAT) {\r\n rgbaData = new Float32Array(width * height * 4);\r\n } else if (textureType === Constants.TEXTURETYPE_HALF_FLOAT) {\r\n rgbaData = new Uint16Array(width * height * 4);\r\n val1 = 15360; // 15360 is the encoding of 1 in half float\r\n } else if (textureType === Constants.TEXTURETYPE_UNSIGNED_INTEGER) {\r\n rgbaData = new Uint32Array(width * height * 4);\r\n } else {\r\n rgbaData = new Uint8Array(width * height * 4);\r\n }\r\n\r\n // Convert each pixel.\r\n for (let x = 0; x < width; x++) {\r\n for (let y = 0; y < height; y++) {\r\n const index = (y * width + x) * 3;\r\n const newIndex = (y * width + x) * 4;\r\n\r\n // Map Old Value to new value.\r\n rgbaData[newIndex + 0] = rgbData[index + 0];\r\n rgbaData[newIndex + 1] = rgbData[index + 1];\r\n rgbaData[newIndex + 2] = rgbData[index + 2];\r\n\r\n // Add fully opaque alpha channel.\r\n rgbaData[newIndex + 3] = val1;\r\n }\r\n }\r\n\r\n return rgbaData;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.renderTargetCube.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Engines/WebGPU/Extensions/engine.renderTargetCube.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,kCAAsC;AACjE,OAAO,EAAE,eAAe,EAAyB,MAAM,6CAA6C,CAAC;AAErG,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAe5C,gBAAgB,CAAC,SAAS,CAAC,6BAA6B,GAAG,UAAU,IAAY,EAAE,OAAqC;IACpH,MAAM,SAAS,GAAG,IAAI,CAAC,kCAAkC,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAE7E,MAAM,WAAW,GAAG;QAChB,eAAe,EAAE,IAAI;QACrB,mBAAmB,EAAE,IAAI;QACzB,qBAAqB,EAAE,KAAK;QAC5B,IAAI,EAAE,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"engine.renderTargetCube.js","sour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,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC;QACnE,OAAO,CAAC,eAAe,GAAG,KAAK,CAAC;IACpC,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC","sourcesContent":["import { ThinWebGPUEngine } from \"core/Engines/thinWebGPUEngine\";\r\nimport { InternalTexture, InternalTextureSource } from \"../../../Materials/Textures/internalTexture\";\r\nimport type { RenderTargetCreationOptions } from \"../../../Materials/Textures/textureCreationOptions\";\r\nimport { Constants } from \"../../constants\";\r\nimport type { RenderTargetWrapper } from \"../../renderTargetWrapper\";\r\n\r\ndeclare module \"../../abstractEngine\" {\r\n export interface AbstractEngine {\r\n /**\r\n * Creates a new render target cube wrapper\r\n * @param size defines the size of the texture\r\n * @param options defines the options used to create the texture\r\n * @returns a new render target cube wrapper\r\n */\r\n createRenderTargetCubeTexture(size: number, options?: RenderTargetCreationOptions): RenderTargetWrapper;\r\n }\r\n}\r\n\r\nThinWebGPUEngine.prototype.createRenderTargetCubeTexture = function (size: number, options?: RenderTargetCreationOptions): RenderTargetWrapper {\r\n const rtWrapper = this._createHardwareRenderTargetWrapper(false, true, size);\r\n\r\n const fullOptions = {\r\n generateMipMaps: true,\r\n generateDepthBuffer: true,\r\n generateStencilBuffer: false,\r\n type: Constants.TEXTURETYPE_UNSIGNED_BYTE,\r\n samplingMode: Constants.TEXTURE_TRILINEAR_SAMPLINGMODE,\r\n format: Constants.TEXTUREFORMAT_RGBA,\r\n samples: 1,\r\n ...options,\r\n };\r\n fullOptions.generateStencilBuffer = fullOptions.generateDepthBuffer && fullOptions.generateStencilBuffer;\r\n\r\n rtWrapper.label = fullOptions.label ?? \"RenderTargetWrapper\";\r\n rtWrapper._generateDepthBuffer = fullOptions.generateDepthBuffer;\r\n rtWrapper._generateStencilBuffer = fullOptions.generateStencilBuffer;\r\n\r\n const texture = new InternalTexture(this, InternalTextureSource.RenderTarget);\r\n\r\n texture.width = size;\r\n texture.height = size;\r\n texture.depth = 0;\r\n texture.isReady = true;\r\n texture.isCube = true;\r\n texture.samples = fullOptions.samples;\r\n texture.generateMipMaps = fullOptions.generateMipMaps;\r\n texture.samplingMode = fullOptions.samplingMode;\r\n texture.type = fullOptions.type;\r\n texture.format = fullOptions.format;\r\n\r\n this._internalTexturesCache.push(texture);\r\n rtWrapper.setTextures(texture);\r\n\r\n if (rtWrapper._generateDepthBuffer || rtWrapper._generateStencilBuffer) {\r\n rtWrapper.createDepthStencilTexture(\r\n 0,\r\n fullOptions.samplingMode === undefined ||\r\n fullOptions.samplingMode === Constants.TEXTURE_BILINEAR_SAMPLINGMODE ||\r\n fullOptions.samplingMode === Constants.TEXTURE_LINEAR_LINEAR ||\r\n fullOptions.samplingMode === Constants.TEXTURE_TRILINEAR_SAMPLINGMODE ||\r\n fullOptions.samplingMode === Constants.TEXTURE_LINEAR_LINEAR_MIPLINEAR ||\r\n fullOptions.samplingMode === Constants.TEXTURE_NEAREST_LINEAR_MIPNEAREST ||\r\n fullOptions.samplingMode === Constants.TEXTURE_NEAREST_LINEAR_MIPLINEAR ||\r\n fullOptions.samplingMode === Constants.TEXTURE_NEAREST_LINEAR ||\r\n fullOptions.samplingMode === Constants.TEXTURE_LINEAR_LINEAR_MIPNEAREST,\r\n rtWrapper._generateStencilBuffer,\r\n rtWrapper.samples\r\n );\r\n }\r\n\r\n if (options && options.createMipMaps && !fullOptions.generateMipMaps) {\r\n texture.generateMipMaps = true;\r\n }\r\n\r\n this._textureHelper.createGPUTextureForInternalTexture(texture);\r\n\r\n if (options && options.createMipMaps && !fullOptions.generateMipMaps) {\r\n texture.generateMipMaps = false;\r\n }\r\n\r\n return rtWrapper;\r\n};\r\n"]}
|
|
@@ -91,6 +91,12 @@ export declare enum TextureFormat {
|
|
|
91
91
|
RG8Snorm = "rg8snorm",// Red and green channels. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.
|
|
92
92
|
RG8Uint = "rg8uint",// Red and green channels. 8 bit integer per channel. Unsigned in shader.
|
|
93
93
|
RG8Sint = "rg8sint",// Red and green channels. 8 bit integer per channel. Signed in shader.
|
|
94
|
+
R16Unorm = "r16unorm",// Red channel only. 16 bit integer per channel. [0, 65535] converted to float [0, 1] in shader.
|
|
95
|
+
R16Snorm = "r16snorm",// Red channel only. 16 bit integer per channel. [-32768, 32767] converted to float [-1, 1] in shader.
|
|
96
|
+
RG16Unorm = "rg16unorm",// Red and green channels. 16 bit integer per channel. [0, 65535] converted to float [0, 1] in shader.
|
|
97
|
+
RG16Snorm = "rg16snorm",// Red and green channels. 16 bit integer per channel. [-32768, 32767] converted to float [-1, 1] in shader.
|
|
98
|
+
RGBA16Unorm = "rgba16unorm",// Red, green, blue, and alpha channels. 16 bit integer per channel. [0, 65535] converted to float [0, 1] in shader.
|
|
99
|
+
RGBA16Snorm = "rgba16snorm",// Red, green, blue, and alpha channels. 16 bit integer per channel. [-32768, 32767] converted to float [-1, 1] in shader.
|
|
94
100
|
R32Uint = "r32uint",// Red channel only. 32 bit integer per channel. Unsigned in shader.
|
|
95
101
|
R32Sint = "r32sint",// Red channel only. 32 bit integer per channel. Signed in shader.
|
|
96
102
|
R32Float = "r32float",// Red channel only. 32 bit float per channel. Float in shader.
|
|
@@ -104,6 +104,12 @@ export var TextureFormat;
|
|
|
104
104
|
TextureFormat["RG8Snorm"] = "rg8snorm";
|
|
105
105
|
TextureFormat["RG8Uint"] = "rg8uint";
|
|
106
106
|
TextureFormat["RG8Sint"] = "rg8sint";
|
|
107
|
+
TextureFormat["R16Unorm"] = "r16unorm";
|
|
108
|
+
TextureFormat["R16Snorm"] = "r16snorm";
|
|
109
|
+
TextureFormat["RG16Unorm"] = "rg16unorm";
|
|
110
|
+
TextureFormat["RG16Snorm"] = "rg16snorm";
|
|
111
|
+
TextureFormat["RGBA16Unorm"] = "rgba16unorm";
|
|
112
|
+
TextureFormat["RGBA16Snorm"] = "rgba16snorm";
|
|
107
113
|
// 32-bit formats
|
|
108
114
|
TextureFormat["R32Uint"] = "r32uint";
|
|
109
115
|
TextureFormat["R32Sint"] = "r32sint";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgpuConstants.js","sourceRoot":"","sources":["../../../../../dev/core/src/Engines/WebGPU/webgpuConstants.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,yCAAyC;AACzC,MAAM,CAAN,IAAkB,eAGjB;AAHD,WAAkB,eAAe;IAC7B,yCAAsB,CAAA;IACtB,uDAAoC,CAAA;AACxC,CAAC,EAHiB,eAAe,KAAf,eAAe,QAGhC;AAED,gBAAgB;AAChB,MAAM,CAAN,IAAkB,WAiBjB;AAjBD,WAAkB,WAAW;IACzB,sDAAuC,CAAA;IACvC,6DAA8C,CAAA;IAC9C,8DAA+C,CAAA;IAC/C,gFAAiE,CAAA;IACjE,kEAAmD,CAAA;IACnD,kEAAmD,CAAA;IACnD,oFAAqE,CAAA;IACrE,iDAAkC,CAAA;IAClC,gEAAiD,CAAA;IACjD,uCAAwB,CAAA;IACxB,mEAAoD,CAAA;IACpD,uDAAwC,CAAA;IACxC,uDAAwC,CAAA;IACxC,qDAAsC,CAAA;IACtC,+CAAgC,CAAA;IAChC,0DAA2C,CAAA;AAC/C,CAAC,EAjBiB,WAAW,KAAX,WAAW,QAiB5B;AAED,gBAAgB;AAChB,MAAM,CAAN,IAAkB,cAIjB;AAJD,WAAkB,cAAc;IAC5B,uCAAqB,CAAA;IACrB,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;AACrB,CAAC,EAJiB,cAAc,KAAd,cAAc,QAI/B;AAED,gBAAgB;AAChB,MAAM,CAAN,IAAY,WAWX;AAXD,WAAY,WAAW;IACnB,mDAAW,CAAA;IACX,qDAAY,CAAA;IACZ,mDAAW,CAAA;IACX,mDAAW,CAAA;IACX,gDAAU,CAAA;IACV,kDAAW,CAAA;IACX,oDAAY,CAAA;IACZ,qDAAa,CAAA;IACb,uDAAc,CAAA;IACd,+DAAkB,CAAA;AACtB,CAAC,EAXW,WAAW,KAAX,WAAW,QAWtB;AAED,g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BAAe,CAAA;IACf,8BAAmB,CAAA;AACvB,CAAC,EAHiB,OAAO,KAAP,OAAO,QAGxB;AAED,gBAAgB;AAChB,MAAM,CAAN,IAAkB,SAGjB;AAHD,WAAkB,SAAS;IACvB,oCAAuB,CAAA;IACvB,oCAAuB,CAAA;AAC3B,CAAC,EAHiB,SAAS,KAAT,SAAS,QAG1B;AAED,gBAAgB;AAChB,MAAM,CAAN,IAAkB,eAGjB;AAHD,WAAkB,eAAe;IAC7B,oCAAiB,CAAA;IACjB,kDAA+B,CAAA;AACnC,CAAC,EAHiB,eAAe,KAAf,eAAe,QAGhC;AAED,gBAAgB;AAChB,MAAM,CAAN,IAAkB,qBAGjB;AAHD,WAAkB,qBAAqB;IACnC,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;AACzB,CAAC,EAHiB,qBAAqB,KAArB,qBAAqB,QAGtC;AAED,gBAAgB;AAChB,MAAM,CAAN,IAAkB,gBAGjB;AAHD,WAAkB,gBAAgB;IAC9B,uCAAmB,CAAA;IACnB,2CAAuB,CAAA;AAC3B,CAAC,EAHiB,gBAAgB,KAAhB,gBAAgB,QAGjC;AAED,gBAAgB;AAChB,MAAM,CAAN,IAAkB,WAIjB;AAJD,WAAkB,WAAW;IACzB,wCAAyB,CAAA;IACzB,4CAA6B,CAAA;IAC7B,oCAAqB,CAAA;AACzB,CAAC,EAJiB,WAAW,KAAX,WAAW,QAI5B","sourcesContent":["/** @internal */\r\n// eslint-disable-next-line import/export\r\nexport const enum PowerPreference {\r\n LowPower = \"low-power\",\r\n HighPerformance = \"high-performance\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum FeatureName {\r\n DepthClipControl = \"depth-clip-control\",\r\n Depth32FloatStencil8 = \"depth32float-stencil8\",\r\n TextureCompressionBC = \"texture-compression-bc\",\r\n TextureCompressionBCSliced3D = \"texture-compression-bc-sliced-3d\",\r\n TextureCompressionETC2 = \"texture-compression-etc2\",\r\n TextureCompressionASTC = \"texture-compression-astc\",\r\n TextureCompressionASTCSliced3D = \"texture-compression-astc-sliced-3d\",\r\n TimestampQuery = \"timestamp-query\",\r\n IndirectFirstInstance = \"indirect-first-instance\",\r\n ShaderF16 = \"shader-f16\",\r\n RG11B10UFloatRenderable = \"rg11b10ufloat-renderable\",\r\n BGRA8UnormStorage = \"bgra8unorm-storage\",\r\n Float32Filterable = \"float32-filterable\",\r\n Float32Blendable = \"float32-blendable\",\r\n ClipDistances = \"clip-distances\",\r\n DualSourceBlending = \"dual-source-blending\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum BufferMapState {\r\n Unmapped = \"unmapped\",\r\n Pending = \"pending\",\r\n Mapped = \"mapped\",\r\n}\r\n\r\n/** @internal */\r\nexport enum BufferUsage {\r\n MapRead = 1,\r\n MapWrite = 2,\r\n CopySrc = 4,\r\n CopyDst = 8,\r\n Index = 16,\r\n Vertex = 32,\r\n Uniform = 64,\r\n Storage = 128,\r\n Indirect = 256,\r\n QueryResolve = 512,\r\n}\r\n\r\n/** @internal */\r\nexport const enum MapMode {\r\n Read = 1,\r\n Write = 2,\r\n}\r\n\r\n/** @internal */\r\nexport const enum TextureDimension {\r\n E1d = \"1d\",\r\n E2d = \"2d\",\r\n E3d = \"3d\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum TextureUsage {\r\n CopySrc = 1,\r\n CopyDst = 2,\r\n TextureBinding = 4,\r\n StorageBinding = 8,\r\n RenderAttachment = 16,\r\n}\r\n\r\n/** @internal */\r\nexport const enum TextureViewDimension {\r\n E1d = \"1d\",\r\n E2d = \"2d\",\r\n E2dArray = \"2d-array\",\r\n Cube = \"cube\",\r\n CubeArray = \"cube-array\",\r\n E3d = \"3d\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum TextureAspect {\r\n All = \"all\",\r\n StencilOnly = \"stencil-only\",\r\n DepthOnly = \"depth-only\",\r\n}\r\n\r\n/**\r\n * Comments taken from https://github.com/gfx-rs/wgpu/blob/master/wgpu-types/src/lib.rs\r\n * @internal\r\n */\r\nexport const enum TextureFormat {\r\n // 8-bit formats\r\n R8Unorm = \"r8unorm\", // Red channel only. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.\r\n R8Snorm = \"r8snorm\", // Red channel only. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.\r\n R8Uint = \"r8uint\", // Red channel only. 8 bit integer per channel. Unsigned in shader.\r\n R8Sint = \"r8sint\", // Red channel only. 8 bit integer per channel. Signed in shader.\r\n\r\n // 16-bit formats\r\n R16Uint = \"r16uint\", // Red channel only. 16 bit integer per channel. Unsigned in shader.\r\n R16Sint = \"r16sint\", // Red channel only. 16 bit integer per channel. Signed in shader.\r\n R16Float = \"r16float\", // Red channel only. 16 bit float per channel. Float in shader.\r\n RG8Unorm = \"rg8unorm\", // Red and green channels. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.\r\n RG8Snorm = \"rg8snorm\", // Red and green channels. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.\r\n RG8Uint = \"rg8uint\", // Red and green channels. 8 bit integer per channel. Unsigned in shader.\r\n RG8Sint = \"rg8sint\", // Red and green channels. 8 bit integer per channel. Signed in shader.\r\n\r\n // 32-bit formats\r\n R32Uint = \"r32uint\", // Red channel only. 32 bit integer per channel. Unsigned in shader.\r\n R32Sint = \"r32sint\", // Red channel only. 32 bit integer per channel. Signed in shader.\r\n R32Float = \"r32float\", // Red channel only. 32 bit float per channel. Float in shader.\r\n RG16Uint = \"rg16uint\", // Red and green channels. 16 bit integer per channel. Unsigned in shader.\r\n RG16Sint = \"rg16sint\", // Red and green channels. 16 bit integer per channel. Signed in shader.\r\n RG16Float = \"rg16float\", // Red and green channels. 16 bit float per channel. Float in shader.\r\n RGBA8Unorm = \"rgba8unorm\", // Red, green, blue, and alpha channels. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.\r\n RGBA8UnormSRGB = \"rgba8unorm-srgb\", // Red, green, blue, and alpha channels. 8 bit integer per channel. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.\r\n RGBA8Snorm = \"rgba8snorm\", // Red, green, blue, and alpha channels. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.\r\n RGBA8Uint = \"rgba8uint\", // Red, green, blue, and alpha channels. 8 bit integer per channel. Unsigned in shader.\r\n RGBA8Sint = \"rgba8sint\", // Red, green, blue, and alpha channels. 8 bit integer per channel. Signed in shader.\r\n BGRA8Unorm = \"bgra8unorm\", // Blue, green, red, and alpha channels. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.\r\n BGRA8UnormSRGB = \"bgra8unorm-srgb\", // Blue, green, red, and alpha channels. 8 bit integer per channel. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.\r\n // Packed 32-bit formats\r\n RGB9E5UFloat = \"rgb9e5ufloat\", // Packed unsigned float with 9 bits mantisa for each RGB component, then a common 5 bits exponent\r\n RGB10A2UINT = \"rgb10a2uint\", // Red, green, blue, and alpha channels. 10 bit integer for RGB channels, 2 bit integer for alpha channel. [0, 1023] ([0, 3] for alpha).\r\n RGB10A2Unorm = \"rgb10a2unorm\", // Red, green, blue, and alpha channels. 10 bit integer for RGB channels, 2 bit integer for alpha channel. [0, 1023] ([0, 3] for alpha) converted to/from float [0, 1] in shader.\r\n RG11B10UFloat = \"rg11b10ufloat\", // Red, green, and blue channels. 11 bit float with no sign bit for RG channels. 10 bit float with no sign bit for blue channel. Float in shader.\r\n\r\n // 64-bit formats\r\n RG32Uint = \"rg32uint\", // Red and green channels. 32 bit integer per channel. Unsigned in shader.\r\n RG32Sint = \"rg32sint\", // Red and green channels. 32 bit integer per channel. Signed in shader.\r\n RG32Float = \"rg32float\", // Red and green channels. 32 bit float per channel. Float in shader.\r\n RGBA16Uint = \"rgba16uint\", // Red, green, blue, and alpha channels. 16 bit integer per channel. Unsigned in shader.\r\n RGBA16Sint = \"rgba16sint\", // Red, green, blue, and alpha channels. 16 bit integer per channel. Signed in shader.\r\n RGBA16Float = \"rgba16float\", // Red, green, blue, and alpha channels. 16 bit float per channel. Float in shader.\r\n\r\n // 128-bit formats\r\n RGBA32Uint = \"rgba32uint\", // Red, green, blue, and alpha channels. 32 bit integer per channel. Unsigned in shader.\r\n RGBA32Sint = \"rgba32sint\", // Red, green, blue, and alpha channels. 32 bit integer per channel. Signed in shader.\r\n RGBA32Float = \"rgba32float\", // Red, green, blue, and alpha channels. 32 bit float per channel. Float in shader.\r\n\r\n // Depth and stencil formats\r\n Stencil8 = \"stencil8\",\r\n Depth16Unorm = \"depth16unorm\",\r\n Depth24Plus = \"depth24plus\", // Special depth format with at least 24 bit integer depth.\r\n Depth24PlusStencil8 = \"depth24plus-stencil8\", // Special depth/stencil format with at least 24 bit integer depth and 8 bits integer stencil.\r\n Depth32Float = \"depth32float\", // Special depth format with 32 bit floating point depth.\r\n\r\n // BC compressed formats usable if \"texture-compression-bc\" is both\r\n // supported by the device/user agent and enabled in requestDevice.\r\n BC1RGBAUnorm = \"bc1-rgba-unorm\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). 4 color + alpha pallet. 5 bit R + 6 bit G + 5 bit B + 1 bit alpha. Also known as DXT1.\r\n BC1RGBAUnormSRGB = \"bc1-rgba-unorm-srgb\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). 4 color + alpha pallet. 5 bit R + 6 bit G + 5 bit B + 1 bit alpha. Also known as DXT1.\r\n BC2RGBAUnorm = \"bc2-rgba-unorm\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet. 5 bit R + 6 bit G + 5 bit B + 4 bit alpha. Also known as DXT3.\r\n BC2RGBAUnormSRGB = \"bc2-rgba-unorm-srgb\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet. 5 bit R + 6 bit G + 5 bit B + 4 bit alpha. Also known as DXT3.\r\n BC3RGBAUnorm = \"bc3-rgba-unorm\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet + 8 alpha pallet. 5 bit R + 6 bit G + 5 bit B + 8 bit alpha. Also known as DXT5.\r\n BC3RGBAUnormSRGB = \"bc3-rgba-unorm-srgb\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet + 8 alpha pallet. 5 bit R + 6 bit G + 5 bit B + 8 bit alpha. Also known as DXT5.\r\n BC4RUnorm = \"bc4-r-unorm\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). 8 color pallet. 8 bit R. Also known as RGTC1.\r\n BC4RSnorm = \"bc4-r-snorm\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). 8 color pallet. 8 bit R. Also known as RGTC1.\r\n BC5RGUnorm = \"bc5-rg-unorm\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). 8 color red pallet + 8 color green pallet. 8 bit RG. Also known as RGTC2.\r\n BC5RGSnorm = \"bc5-rg-snorm\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). 8 color red pallet + 8 color green pallet. 8 bit RG. Also known as RGTC2.\r\n BC6HRGBUFloat = \"bc6h-rgb-ufloat\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 16 bit unsigned float RGB. Float in shader. Also known as BPTC (float).\r\n BC6HRGBFloat = \"bc6h-rgb-float\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 16 bit signed float RGB. Float in shader. Also known as BPTC (float).\r\n BC7RGBAUnorm = \"bc7-rgba-unorm\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 8 bit integer RGBA. Also known as BPTC (unorm).\r\n BC7RGBAUnormSRGB = \"bc7-rgba-unorm-srgb\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 8 bit integer RGBA. Also known as BPTC (unorm).\r\n\r\n // ETC2 compressed formats usable if \"texture-compression-etc2\" is both\r\n // supported by the device/user agent and enabled in requestDevice.\r\n ETC2RGB8Unorm = \"etc2-rgb8unorm\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB.\r\n ETC2RGB8UnormSRGB = \"etc2-rgb8unorm-srgb\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB.\r\n ETC2RGB8A1Unorm = \"etc2-rgb8a1unorm\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB + 1 bit alpha.\r\n ETC2RGB8A1UnormSRGB = \"etc2-rgb8a1unorm-srgb\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB + 1 bit alpha.\r\n ETC2RGBA8Unorm = \"etc2-rgba8unorm\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 8 bit integer RGB + 8 bit alpha.\r\n ETC2RGBA8UnormSRGB = \"etc2-rgba8unorm-srgb\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 8 bit integer RGB + 8 bit alpha.\r\n EACR11Unorm = \"eac-r11unorm\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 11 bit integer R.\r\n EACR11Snorm = \"eac-r11snorm\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 11 bit integer R.\r\n EACRG11Unorm = \"eac-rg11unorm\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 11 bit integer R + 11 bit integer G.\r\n EACRG11Snorm = \"eac-rg11snorm\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 11 bit integer R + 11 bit integer G.\r\n\r\n // ASTC compressed formats usable if \"texture-compression-astc\" is both\r\n // supported by the device/user agent and enabled in requestDevice.\r\n ASTC4x4Unorm = \"astc-4x4-unorm\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC4x4UnormSRGB = \"astc-4x4-unorm-srgb\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC5x4Unorm = \"astc-5x4-unorm\", // 5x4 block compressed texture. 16 bytes per block (6.4 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC5x4UnormSRGB = \"astc-5x4-unorm-srgb\", // 5x4 block compressed texture. 16 bytes per block (6.4 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC5x5Unorm = \"astc-5x5-unorm\", // 5x5 block compressed texture. 16 bytes per block (5.12 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC5x5UnormSRGB = \"astc-5x5-unorm-srgb\", // 5x5 block compressed texture. 16 bytes per block (5.12 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC6x5Unorm = \"astc-6x5-unorm\", // 6x5 block compressed texture. 16 bytes per block (4.27 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC6x5UnormSRGB = \"astc-6x5-unorm-srgb\", // 6x5 block compressed texture. 16 bytes per block (4.27 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC6x6Unorm = \"astc-6x6-unorm\", // 6x6 block compressed texture. 16 bytes per block (3.56 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC6x6UnormSRGB = \"astc-6x6-unorm-srgb\", // 6x6 block compressed texture. 16 bytes per block (3.56 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC8x5Unorm = \"astc-8x5-unorm\", // 8x5 block compressed texture. 16 bytes per block (3.2 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC8x5UnormSRGB = \"astc-8x5-unorm-srgb\", // 8x5 block compressed texture. 16 bytes per block (3.2 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC8x6Unorm = \"astc-8x6-unorm\", // 8x6 block compressed texture. 16 bytes per block (2.67 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC8x6UnormSRGB = \"astc-8x6-unorm-srgb\", // 8x6 block compressed texture. 16 bytes per block (2.67 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC8x8Unorm = \"astc-8x8-unorm\", // 8x8 block compressed texture. 16 bytes per block (2 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC8x8UnormSRGB = \"astc-8x8-unorm-srgb\", // 8x8 block compressed texture. 16 bytes per block (2 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC10x5Unorm = \"astc-10x5-unorm\", // 10x5 block compressed texture. 16 bytes per block (2.56 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC10x5UnormSRGB = \"astc-10x5-unorm-srgb\", // 10x5 block compressed texture. 16 bytes per block (2.56 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC10x6Unorm = \"astc-10x6-unorm\", // 10x6 block compressed texture. 16 bytes per block (2.13 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC10x6UnormSRGB = \"astc-10x6-unorm-srgb\", // 10x6 block compressed texture. 16 bytes per block (2.13 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC10x8Unorm = \"astc-10x8-unorm\", // 10x8 block compressed texture. 16 bytes per block (1.6 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC10x8UnormSRGB = \"astc-10x8-unorm-srgb\", // 10x8 block compressed texture. 16 bytes per block (1.6 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC10x10Unorm = \"astc-10x10-unorm\", // 10x10 block compressed texture. 16 bytes per block (1.28 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC10x10UnormSRGB = \"astc-10x10-unorm-srgb\", // 10x10 block compressed texture. 16 bytes per block (1.28 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC12x10Unorm = \"astc-12x10-unorm\", // 12x10 block compressed texture. 16 bytes per block (1.07 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC12x10UnormSRGB = \"astc-12x10-unorm-srgb\", // 12x10 block compressed texture. 16 bytes per block (1.07 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC12x12Unorm = \"astc-12x12-unorm\", // 12x12 block compressed texture. 16 bytes per block (0.89 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC12x12UnormSRGB = \"astc-12x12-unorm-srgb\", // 12x12 block compressed texture. 16 bytes per block (0.89 bit/px). Complex pallet. 8 bit integer RGBA.\r\n\r\n // \"depth32float-stencil8\" feature\r\n Depth32FloatStencil8 = \"depth32float-stencil8\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum AddressMode {\r\n ClampToEdge = \"clamp-to-edge\",\r\n Repeat = \"repeat\",\r\n MirrorRepeat = \"mirror-repeat\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum FilterMode {\r\n Nearest = \"nearest\",\r\n Linear = \"linear\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum MipmapFilterMode {\r\n Nearest = \"nearest\",\r\n Linear = \"linear\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum CompareFunction {\r\n Never = \"never\",\r\n Less = \"less\",\r\n Equal = \"equal\",\r\n LessEqual = \"less-equal\",\r\n Greater = \"greater\",\r\n NotEqual = \"not-equal\",\r\n GreaterEqual = \"greater-equal\",\r\n Always = \"always\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum ShaderStage {\r\n Vertex = 1,\r\n Fragment = 2,\r\n Compute = 4,\r\n}\r\n\r\n/** @internal */\r\nexport const enum BufferBindingType {\r\n Uniform = \"uniform\",\r\n Storage = \"storage\",\r\n ReadOnlyStorage = \"read-only-storage\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum SamplerBindingType {\r\n Filtering = \"filtering\",\r\n NonFiltering = \"non-filtering\",\r\n Comparison = \"comparison\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum TextureSampleType {\r\n Float = \"float\",\r\n UnfilterableFloat = \"unfilterable-float\",\r\n Depth = \"depth\",\r\n Sint = \"sint\",\r\n Uint = \"uint\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum StorageTextureAccess {\r\n WriteOnly = \"write-only\",\r\n ReadOnly = \"read-only\",\r\n ReadWrite = \"read-write\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum CompilationMessageType {\r\n Error = \"error\",\r\n Warning = \"warning\",\r\n Info = \"info\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum PipelineErrorReason {\r\n Validation = \"validation\",\r\n Internal = \"internal\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum AutoLayoutMode {\r\n Auto = \"auto\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum PrimitiveTopology {\r\n PointList = \"point-list\",\r\n LineList = \"line-list\",\r\n LineStrip = \"line-strip\",\r\n TriangleList = \"triangle-list\",\r\n TriangleStrip = \"triangle-strip\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum FrontFace {\r\n CCW = \"ccw\",\r\n CW = \"cw\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum CullMode {\r\n None = \"none\",\r\n Front = \"front\",\r\n Back = \"back\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum ColorWrite {\r\n Red = 1,\r\n Green = 2,\r\n Blue = 4,\r\n Alpha = 8,\r\n All = 15,\r\n}\r\n\r\n/** @internal */\r\nexport const enum BlendFactor {\r\n Zero = \"zero\",\r\n One = \"one\",\r\n Src = \"src\",\r\n OneMinusSrc = \"one-minus-src\",\r\n SrcAlpha = \"src-alpha\",\r\n OneMinusSrcAlpha = \"one-minus-src-alpha\",\r\n Dst = \"dst\",\r\n OneMinusDst = \"one-minus-dst\",\r\n DstAlpha = \"dst-alpha\",\r\n OneMinusDstAlpha = \"one-minus-dst-alpha\",\r\n SrcAlphaSaturated = \"src-alpha-saturated\",\r\n Constant = \"constant\",\r\n OneMinusConstant = \"one-minus-constant\",\r\n Src1 = \"src1\",\r\n OneMinusSrc1 = \"one-minus-src1\",\r\n Src1Alpha = \"src1-alpha\",\r\n OneMinusSrc1Alpha = \"one-minus-src1-alpha\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum BlendOperation {\r\n Add = \"add\",\r\n Subtract = \"subtract\",\r\n ReverseSubtract = \"reverse-subtract\",\r\n Min = \"min\",\r\n Max = \"max\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum StencilOperation {\r\n Keep = \"keep\",\r\n Zero = \"zero\",\r\n Replace = \"replace\",\r\n Invert = \"invert\",\r\n IncrementClamp = \"increment-clamp\",\r\n DecrementClamp = \"decrement-clamp\",\r\n IncrementWrap = \"increment-wrap\",\r\n DecrementWrap = \"decrement-wrap\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum IndexFormat {\r\n Uint16 = \"uint16\",\r\n Uint32 = \"uint32\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum VertexFormat {\r\n Uint8x2 = \"uint8x2\",\r\n Uint8x4 = \"uint8x4\",\r\n Sint8x2 = \"sint8x2\",\r\n Sint8x4 = \"sint8x4\",\r\n Unorm8x2 = \"unorm8x2\",\r\n Unorm8x4 = \"unorm8x4\",\r\n Snorm8x2 = \"snorm8x2\",\r\n Snorm8x4 = \"snorm8x4\",\r\n Uint16x2 = \"uint16x2\",\r\n Uint16x4 = \"uint16x4\",\r\n Sint16x2 = \"sint16x2\",\r\n Sint16x4 = \"sint16x4\",\r\n Unorm16x2 = \"unorm16x2\",\r\n Unorm16x4 = \"unorm16x4\",\r\n Snorm16x2 = \"snorm16x2\",\r\n Snorm16x4 = \"snorm16x4\",\r\n Float16x2 = \"float16x2\",\r\n Float16x4 = \"float16x4\",\r\n Float32 = \"float32\",\r\n Float32x2 = \"float32x2\",\r\n Float32x3 = \"float32x3\",\r\n Float32x4 = \"float32x4\",\r\n Uint32 = \"uint32\",\r\n Uint32x2 = \"uint32x2\",\r\n Uint32x3 = \"uint32x3\",\r\n Uint32x4 = \"uint32x4\",\r\n Sint32 = \"sint32\",\r\n Sint32x2 = \"sint32x2\",\r\n Sint32x3 = \"sint32x3\",\r\n Sint32x4 = \"sint32x4\",\r\n UNORM10x10x10x2 = \"unorm10-10-10-2\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum VertexStepMode {\r\n Vertex = \"vertex\",\r\n Instance = \"instance\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum ComputePassTimestampLocation {\r\n Beginning = \"beginning\",\r\n End = \"end\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum RenderPassTimestampLocation {\r\n Beginning = \"beginning\",\r\n End = \"end\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum LoadOp {\r\n Load = \"load\",\r\n Clear = \"clear\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum StoreOp {\r\n Store = \"store\",\r\n Discard = \"discard\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum QueryType {\r\n Occlusion = \"occlusion\",\r\n Timestamp = \"timestamp\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum CanvasAlphaMode {\r\n Opaque = \"opaque\",\r\n Premultiplied = \"premultiplied\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum CanvasToneMappingMode {\r\n Standard = \"standard\",\r\n Extended = \"extended\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum DeviceLostReason {\r\n Unknown = \"unknown\",\r\n Destroyed = \"destroyed\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum ErrorFilter {\r\n Validation = \"validation\",\r\n OutOfMemory = \"out-of-memory\",\r\n Internal = \"internal\",\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"webgpuConstants.js","sourceRoot":"","sources":["../../../../../dev/core/src/Engines/WebGPU/webgpuConstants.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,yCAAyC;AACzC,MAAM,CAAN,IAAkB,eAGjB;AAHD,WAAkB,eAAe;IAC7B,yCAAsB,CAAA;IACtB,uDAAoC,CAAA;AACxC,CAAC,EAHiB,eAAe,KAAf,eAAe,QAGhC;AAED,gBAAgB;AAChB,MAAM,CAAN,IAAkB,WAiBjB;AAjBD,WAAkB,WAAW;IACzB,sDAAuC,CAAA;IACvC,6DAA8C,CAAA;IAC9C,8DAA+C,CAAA;IAC/C,gFAAiE,CAAA;IACjE,kEAAmD,CAAA;IACnD,kEAAmD,CAAA;IACnD,oFAAqE,CAAA;IACrE,iDAAkC,CAAA;IAClC,gEAAiD,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AqB;IACnC,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;AACzB,CAAC,EAHiB,qBAAqB,KAArB,qBAAqB,QAGtC;AAED,gBAAgB;AAChB,MAAM,CAAN,IAAkB,gBAGjB;AAHD,WAAkB,gBAAgB;IAC9B,uCAAmB,CAAA;IACnB,2CAAuB,CAAA;AAC3B,CAAC,EAHiB,gBAAgB,KAAhB,gBAAgB,QAGjC;AAED,gBAAgB;AAChB,MAAM,CAAN,IAAkB,WAIjB;AAJD,WAAkB,WAAW;IACzB,wCAAyB,CAAA;IACzB,4CAA6B,CAAA;IAC7B,oCAAqB,CAAA;AACzB,CAAC,EAJiB,WAAW,KAAX,WAAW,QAI5B","sourcesContent":["/** @internal */\r\n// eslint-disable-next-line import/export\r\nexport const enum PowerPreference {\r\n LowPower = \"low-power\",\r\n HighPerformance = \"high-performance\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum FeatureName {\r\n DepthClipControl = \"depth-clip-control\",\r\n Depth32FloatStencil8 = \"depth32float-stencil8\",\r\n TextureCompressionBC = \"texture-compression-bc\",\r\n TextureCompressionBCSliced3D = \"texture-compression-bc-sliced-3d\",\r\n TextureCompressionETC2 = \"texture-compression-etc2\",\r\n TextureCompressionASTC = \"texture-compression-astc\",\r\n TextureCompressionASTCSliced3D = \"texture-compression-astc-sliced-3d\",\r\n TimestampQuery = \"timestamp-query\",\r\n IndirectFirstInstance = \"indirect-first-instance\",\r\n ShaderF16 = \"shader-f16\",\r\n RG11B10UFloatRenderable = \"rg11b10ufloat-renderable\",\r\n BGRA8UnormStorage = \"bgra8unorm-storage\",\r\n Float32Filterable = \"float32-filterable\",\r\n Float32Blendable = \"float32-blendable\",\r\n ClipDistances = \"clip-distances\",\r\n DualSourceBlending = \"dual-source-blending\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum BufferMapState {\r\n Unmapped = \"unmapped\",\r\n Pending = \"pending\",\r\n Mapped = \"mapped\",\r\n}\r\n\r\n/** @internal */\r\nexport enum BufferUsage {\r\n MapRead = 1,\r\n MapWrite = 2,\r\n CopySrc = 4,\r\n CopyDst = 8,\r\n Index = 16,\r\n Vertex = 32,\r\n Uniform = 64,\r\n Storage = 128,\r\n Indirect = 256,\r\n QueryResolve = 512,\r\n}\r\n\r\n/** @internal */\r\nexport const enum MapMode {\r\n Read = 1,\r\n Write = 2,\r\n}\r\n\r\n/** @internal */\r\nexport const enum TextureDimension {\r\n E1d = \"1d\",\r\n E2d = \"2d\",\r\n E3d = \"3d\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum TextureUsage {\r\n CopySrc = 1,\r\n CopyDst = 2,\r\n TextureBinding = 4,\r\n StorageBinding = 8,\r\n RenderAttachment = 16,\r\n}\r\n\r\n/** @internal */\r\nexport const enum TextureViewDimension {\r\n E1d = \"1d\",\r\n E2d = \"2d\",\r\n E2dArray = \"2d-array\",\r\n Cube = \"cube\",\r\n CubeArray = \"cube-array\",\r\n E3d = \"3d\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum TextureAspect {\r\n All = \"all\",\r\n StencilOnly = \"stencil-only\",\r\n DepthOnly = \"depth-only\",\r\n}\r\n\r\n/**\r\n * Comments taken from https://github.com/gfx-rs/wgpu/blob/master/wgpu-types/src/lib.rs\r\n * @internal\r\n */\r\nexport const enum TextureFormat {\r\n // 8-bit formats\r\n R8Unorm = \"r8unorm\", // Red channel only. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.\r\n R8Snorm = \"r8snorm\", // Red channel only. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.\r\n R8Uint = \"r8uint\", // Red channel only. 8 bit integer per channel. Unsigned in shader.\r\n R8Sint = \"r8sint\", // Red channel only. 8 bit integer per channel. Signed in shader.\r\n\r\n // 16-bit formats\r\n R16Uint = \"r16uint\", // Red channel only. 16 bit integer per channel. Unsigned in shader.\r\n R16Sint = \"r16sint\", // Red channel only. 16 bit integer per channel. Signed in shader.\r\n R16Float = \"r16float\", // Red channel only. 16 bit float per channel. Float in shader.\r\n RG8Unorm = \"rg8unorm\", // Red and green channels. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.\r\n RG8Snorm = \"rg8snorm\", // Red and green channels. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.\r\n RG8Uint = \"rg8uint\", // Red and green channels. 8 bit integer per channel. Unsigned in shader.\r\n RG8Sint = \"rg8sint\", // Red and green channels. 8 bit integer per channel. Signed in shader.\r\n R16Unorm = \"r16unorm\", // Red channel only. 16 bit integer per channel. [0, 65535] converted to float [0, 1] in shader.\r\n R16Snorm = \"r16snorm\", // Red channel only. 16 bit integer per channel. [-32768, 32767] converted to float [-1, 1] in shader.\r\n RG16Unorm = \"rg16unorm\", // Red and green channels. 16 bit integer per channel. [0, 65535] converted to float [0, 1] in shader.\r\n RG16Snorm = \"rg16snorm\", // Red and green channels. 16 bit integer per channel. [-32768, 32767] converted to float [-1, 1] in shader.\r\n RGBA16Unorm = \"rgba16unorm\", // Red, green, blue, and alpha channels. 16 bit integer per channel. [0, 65535] converted to float [0, 1] in shader.\r\n RGBA16Snorm = \"rgba16snorm\", // Red, green, blue, and alpha channels. 16 bit integer per channel. [-32768, 32767] converted to float [-1, 1] in shader.\r\n\r\n // 32-bit formats\r\n R32Uint = \"r32uint\", // Red channel only. 32 bit integer per channel. Unsigned in shader.\r\n R32Sint = \"r32sint\", // Red channel only. 32 bit integer per channel. Signed in shader.\r\n R32Float = \"r32float\", // Red channel only. 32 bit float per channel. Float in shader.\r\n RG16Uint = \"rg16uint\", // Red and green channels. 16 bit integer per channel. Unsigned in shader.\r\n RG16Sint = \"rg16sint\", // Red and green channels. 16 bit integer per channel. Signed in shader.\r\n RG16Float = \"rg16float\", // Red and green channels. 16 bit float per channel. Float in shader.\r\n RGBA8Unorm = \"rgba8unorm\", // Red, green, blue, and alpha channels. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.\r\n RGBA8UnormSRGB = \"rgba8unorm-srgb\", // Red, green, blue, and alpha channels. 8 bit integer per channel. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.\r\n RGBA8Snorm = \"rgba8snorm\", // Red, green, blue, and alpha channels. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.\r\n RGBA8Uint = \"rgba8uint\", // Red, green, blue, and alpha channels. 8 bit integer per channel. Unsigned in shader.\r\n RGBA8Sint = \"rgba8sint\", // Red, green, blue, and alpha channels. 8 bit integer per channel. Signed in shader.\r\n BGRA8Unorm = \"bgra8unorm\", // Blue, green, red, and alpha channels. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.\r\n BGRA8UnormSRGB = \"bgra8unorm-srgb\", // Blue, green, red, and alpha channels. 8 bit integer per channel. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.\r\n // Packed 32-bit formats\r\n RGB9E5UFloat = \"rgb9e5ufloat\", // Packed unsigned float with 9 bits mantisa for each RGB component, then a common 5 bits exponent\r\n RGB10A2UINT = \"rgb10a2uint\", // Red, green, blue, and alpha channels. 10 bit integer for RGB channels, 2 bit integer for alpha channel. [0, 1023] ([0, 3] for alpha).\r\n RGB10A2Unorm = \"rgb10a2unorm\", // Red, green, blue, and alpha channels. 10 bit integer for RGB channels, 2 bit integer for alpha channel. [0, 1023] ([0, 3] for alpha) converted to/from float [0, 1] in shader.\r\n RG11B10UFloat = \"rg11b10ufloat\", // Red, green, and blue channels. 11 bit float with no sign bit for RG channels. 10 bit float with no sign bit for blue channel. Float in shader.\r\n\r\n // 64-bit formats\r\n RG32Uint = \"rg32uint\", // Red and green channels. 32 bit integer per channel. Unsigned in shader.\r\n RG32Sint = \"rg32sint\", // Red and green channels. 32 bit integer per channel. Signed in shader.\r\n RG32Float = \"rg32float\", // Red and green channels. 32 bit float per channel. Float in shader.\r\n RGBA16Uint = \"rgba16uint\", // Red, green, blue, and alpha channels. 16 bit integer per channel. Unsigned in shader.\r\n RGBA16Sint = \"rgba16sint\", // Red, green, blue, and alpha channels. 16 bit integer per channel. Signed in shader.\r\n RGBA16Float = \"rgba16float\", // Red, green, blue, and alpha channels. 16 bit float per channel. Float in shader.\r\n\r\n // 128-bit formats\r\n RGBA32Uint = \"rgba32uint\", // Red, green, blue, and alpha channels. 32 bit integer per channel. Unsigned in shader.\r\n RGBA32Sint = \"rgba32sint\", // Red, green, blue, and alpha channels. 32 bit integer per channel. Signed in shader.\r\n RGBA32Float = \"rgba32float\", // Red, green, blue, and alpha channels. 32 bit float per channel. Float in shader.\r\n\r\n // Depth and stencil formats\r\n Stencil8 = \"stencil8\",\r\n Depth16Unorm = \"depth16unorm\",\r\n Depth24Plus = \"depth24plus\", // Special depth format with at least 24 bit integer depth.\r\n Depth24PlusStencil8 = \"depth24plus-stencil8\", // Special depth/stencil format with at least 24 bit integer depth and 8 bits integer stencil.\r\n Depth32Float = \"depth32float\", // Special depth format with 32 bit floating point depth.\r\n\r\n // BC compressed formats usable if \"texture-compression-bc\" is both\r\n // supported by the device/user agent and enabled in requestDevice.\r\n BC1RGBAUnorm = \"bc1-rgba-unorm\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). 4 color + alpha pallet. 5 bit R + 6 bit G + 5 bit B + 1 bit alpha. Also known as DXT1.\r\n BC1RGBAUnormSRGB = \"bc1-rgba-unorm-srgb\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). 4 color + alpha pallet. 5 bit R + 6 bit G + 5 bit B + 1 bit alpha. Also known as DXT1.\r\n BC2RGBAUnorm = \"bc2-rgba-unorm\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet. 5 bit R + 6 bit G + 5 bit B + 4 bit alpha. Also known as DXT3.\r\n BC2RGBAUnormSRGB = \"bc2-rgba-unorm-srgb\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet. 5 bit R + 6 bit G + 5 bit B + 4 bit alpha. Also known as DXT3.\r\n BC3RGBAUnorm = \"bc3-rgba-unorm\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet + 8 alpha pallet. 5 bit R + 6 bit G + 5 bit B + 8 bit alpha. Also known as DXT5.\r\n BC3RGBAUnormSRGB = \"bc3-rgba-unorm-srgb\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet + 8 alpha pallet. 5 bit R + 6 bit G + 5 bit B + 8 bit alpha. Also known as DXT5.\r\n BC4RUnorm = \"bc4-r-unorm\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). 8 color pallet. 8 bit R. Also known as RGTC1.\r\n BC4RSnorm = \"bc4-r-snorm\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). 8 color pallet. 8 bit R. Also known as RGTC1.\r\n BC5RGUnorm = \"bc5-rg-unorm\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). 8 color red pallet + 8 color green pallet. 8 bit RG. Also known as RGTC2.\r\n BC5RGSnorm = \"bc5-rg-snorm\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). 8 color red pallet + 8 color green pallet. 8 bit RG. Also known as RGTC2.\r\n BC6HRGBUFloat = \"bc6h-rgb-ufloat\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 16 bit unsigned float RGB. Float in shader. Also known as BPTC (float).\r\n BC6HRGBFloat = \"bc6h-rgb-float\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 16 bit signed float RGB. Float in shader. Also known as BPTC (float).\r\n BC7RGBAUnorm = \"bc7-rgba-unorm\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 8 bit integer RGBA. Also known as BPTC (unorm).\r\n BC7RGBAUnormSRGB = \"bc7-rgba-unorm-srgb\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 8 bit integer RGBA. Also known as BPTC (unorm).\r\n\r\n // ETC2 compressed formats usable if \"texture-compression-etc2\" is both\r\n // supported by the device/user agent and enabled in requestDevice.\r\n ETC2RGB8Unorm = \"etc2-rgb8unorm\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB.\r\n ETC2RGB8UnormSRGB = \"etc2-rgb8unorm-srgb\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB.\r\n ETC2RGB8A1Unorm = \"etc2-rgb8a1unorm\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB + 1 bit alpha.\r\n ETC2RGB8A1UnormSRGB = \"etc2-rgb8a1unorm-srgb\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB + 1 bit alpha.\r\n ETC2RGBA8Unorm = \"etc2-rgba8unorm\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 8 bit integer RGB + 8 bit alpha.\r\n ETC2RGBA8UnormSRGB = \"etc2-rgba8unorm-srgb\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 8 bit integer RGB + 8 bit alpha.\r\n EACR11Unorm = \"eac-r11unorm\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 11 bit integer R.\r\n EACR11Snorm = \"eac-r11snorm\", // 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 11 bit integer R.\r\n EACRG11Unorm = \"eac-rg11unorm\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 11 bit integer R + 11 bit integer G.\r\n EACRG11Snorm = \"eac-rg11snorm\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 11 bit integer R + 11 bit integer G.\r\n\r\n // ASTC compressed formats usable if \"texture-compression-astc\" is both\r\n // supported by the device/user agent and enabled in requestDevice.\r\n ASTC4x4Unorm = \"astc-4x4-unorm\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC4x4UnormSRGB = \"astc-4x4-unorm-srgb\", // 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC5x4Unorm = \"astc-5x4-unorm\", // 5x4 block compressed texture. 16 bytes per block (6.4 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC5x4UnormSRGB = \"astc-5x4-unorm-srgb\", // 5x4 block compressed texture. 16 bytes per block (6.4 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC5x5Unorm = \"astc-5x5-unorm\", // 5x5 block compressed texture. 16 bytes per block (5.12 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC5x5UnormSRGB = \"astc-5x5-unorm-srgb\", // 5x5 block compressed texture. 16 bytes per block (5.12 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC6x5Unorm = \"astc-6x5-unorm\", // 6x5 block compressed texture. 16 bytes per block (4.27 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC6x5UnormSRGB = \"astc-6x5-unorm-srgb\", // 6x5 block compressed texture. 16 bytes per block (4.27 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC6x6Unorm = \"astc-6x6-unorm\", // 6x6 block compressed texture. 16 bytes per block (3.56 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC6x6UnormSRGB = \"astc-6x6-unorm-srgb\", // 6x6 block compressed texture. 16 bytes per block (3.56 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC8x5Unorm = \"astc-8x5-unorm\", // 8x5 block compressed texture. 16 bytes per block (3.2 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC8x5UnormSRGB = \"astc-8x5-unorm-srgb\", // 8x5 block compressed texture. 16 bytes per block (3.2 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC8x6Unorm = \"astc-8x6-unorm\", // 8x6 block compressed texture. 16 bytes per block (2.67 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC8x6UnormSRGB = \"astc-8x6-unorm-srgb\", // 8x6 block compressed texture. 16 bytes per block (2.67 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC8x8Unorm = \"astc-8x8-unorm\", // 8x8 block compressed texture. 16 bytes per block (2 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC8x8UnormSRGB = \"astc-8x8-unorm-srgb\", // 8x8 block compressed texture. 16 bytes per block (2 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC10x5Unorm = \"astc-10x5-unorm\", // 10x5 block compressed texture. 16 bytes per block (2.56 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC10x5UnormSRGB = \"astc-10x5-unorm-srgb\", // 10x5 block compressed texture. 16 bytes per block (2.56 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC10x6Unorm = \"astc-10x6-unorm\", // 10x6 block compressed texture. 16 bytes per block (2.13 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC10x6UnormSRGB = \"astc-10x6-unorm-srgb\", // 10x6 block compressed texture. 16 bytes per block (2.13 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC10x8Unorm = \"astc-10x8-unorm\", // 10x8 block compressed texture. 16 bytes per block (1.6 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC10x8UnormSRGB = \"astc-10x8-unorm-srgb\", // 10x8 block compressed texture. 16 bytes per block (1.6 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC10x10Unorm = \"astc-10x10-unorm\", // 10x10 block compressed texture. 16 bytes per block (1.28 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC10x10UnormSRGB = \"astc-10x10-unorm-srgb\", // 10x10 block compressed texture. 16 bytes per block (1.28 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC12x10Unorm = \"astc-12x10-unorm\", // 12x10 block compressed texture. 16 bytes per block (1.07 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC12x10UnormSRGB = \"astc-12x10-unorm-srgb\", // 12x10 block compressed texture. 16 bytes per block (1.07 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC12x12Unorm = \"astc-12x12-unorm\", // 12x12 block compressed texture. 16 bytes per block (0.89 bit/px). Complex pallet. 8 bit integer RGBA.\r\n ASTC12x12UnormSRGB = \"astc-12x12-unorm-srgb\", // 12x12 block compressed texture. 16 bytes per block (0.89 bit/px). Complex pallet. 8 bit integer RGBA.\r\n\r\n // \"depth32float-stencil8\" feature\r\n Depth32FloatStencil8 = \"depth32float-stencil8\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum AddressMode {\r\n ClampToEdge = \"clamp-to-edge\",\r\n Repeat = \"repeat\",\r\n MirrorRepeat = \"mirror-repeat\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum FilterMode {\r\n Nearest = \"nearest\",\r\n Linear = \"linear\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum MipmapFilterMode {\r\n Nearest = \"nearest\",\r\n Linear = \"linear\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum CompareFunction {\r\n Never = \"never\",\r\n Less = \"less\",\r\n Equal = \"equal\",\r\n LessEqual = \"less-equal\",\r\n Greater = \"greater\",\r\n NotEqual = \"not-equal\",\r\n GreaterEqual = \"greater-equal\",\r\n Always = \"always\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum ShaderStage {\r\n Vertex = 1,\r\n Fragment = 2,\r\n Compute = 4,\r\n}\r\n\r\n/** @internal */\r\nexport const enum BufferBindingType {\r\n Uniform = \"uniform\",\r\n Storage = \"storage\",\r\n ReadOnlyStorage = \"read-only-storage\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum SamplerBindingType {\r\n Filtering = \"filtering\",\r\n NonFiltering = \"non-filtering\",\r\n Comparison = \"comparison\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum TextureSampleType {\r\n Float = \"float\",\r\n UnfilterableFloat = \"unfilterable-float\",\r\n Depth = \"depth\",\r\n Sint = \"sint\",\r\n Uint = \"uint\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum StorageTextureAccess {\r\n WriteOnly = \"write-only\",\r\n ReadOnly = \"read-only\",\r\n ReadWrite = \"read-write\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum CompilationMessageType {\r\n Error = \"error\",\r\n Warning = \"warning\",\r\n Info = \"info\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum PipelineErrorReason {\r\n Validation = \"validation\",\r\n Internal = \"internal\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum AutoLayoutMode {\r\n Auto = \"auto\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum PrimitiveTopology {\r\n PointList = \"point-list\",\r\n LineList = \"line-list\",\r\n LineStrip = \"line-strip\",\r\n TriangleList = \"triangle-list\",\r\n TriangleStrip = \"triangle-strip\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum FrontFace {\r\n CCW = \"ccw\",\r\n CW = \"cw\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum CullMode {\r\n None = \"none\",\r\n Front = \"front\",\r\n Back = \"back\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum ColorWrite {\r\n Red = 1,\r\n Green = 2,\r\n Blue = 4,\r\n Alpha = 8,\r\n All = 15,\r\n}\r\n\r\n/** @internal */\r\nexport const enum BlendFactor {\r\n Zero = \"zero\",\r\n One = \"one\",\r\n Src = \"src\",\r\n OneMinusSrc = \"one-minus-src\",\r\n SrcAlpha = \"src-alpha\",\r\n OneMinusSrcAlpha = \"one-minus-src-alpha\",\r\n Dst = \"dst\",\r\n OneMinusDst = \"one-minus-dst\",\r\n DstAlpha = \"dst-alpha\",\r\n OneMinusDstAlpha = \"one-minus-dst-alpha\",\r\n SrcAlphaSaturated = \"src-alpha-saturated\",\r\n Constant = \"constant\",\r\n OneMinusConstant = \"one-minus-constant\",\r\n Src1 = \"src1\",\r\n OneMinusSrc1 = \"one-minus-src1\",\r\n Src1Alpha = \"src1-alpha\",\r\n OneMinusSrc1Alpha = \"one-minus-src1-alpha\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum BlendOperation {\r\n Add = \"add\",\r\n Subtract = \"subtract\",\r\n ReverseSubtract = \"reverse-subtract\",\r\n Min = \"min\",\r\n Max = \"max\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum StencilOperation {\r\n Keep = \"keep\",\r\n Zero = \"zero\",\r\n Replace = \"replace\",\r\n Invert = \"invert\",\r\n IncrementClamp = \"increment-clamp\",\r\n DecrementClamp = \"decrement-clamp\",\r\n IncrementWrap = \"increment-wrap\",\r\n DecrementWrap = \"decrement-wrap\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum IndexFormat {\r\n Uint16 = \"uint16\",\r\n Uint32 = \"uint32\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum VertexFormat {\r\n Uint8x2 = \"uint8x2\",\r\n Uint8x4 = \"uint8x4\",\r\n Sint8x2 = \"sint8x2\",\r\n Sint8x4 = \"sint8x4\",\r\n Unorm8x2 = \"unorm8x2\",\r\n Unorm8x4 = \"unorm8x4\",\r\n Snorm8x2 = \"snorm8x2\",\r\n Snorm8x4 = \"snorm8x4\",\r\n Uint16x2 = \"uint16x2\",\r\n Uint16x4 = \"uint16x4\",\r\n Sint16x2 = \"sint16x2\",\r\n Sint16x4 = \"sint16x4\",\r\n Unorm16x2 = \"unorm16x2\",\r\n Unorm16x4 = \"unorm16x4\",\r\n Snorm16x2 = \"snorm16x2\",\r\n Snorm16x4 = \"snorm16x4\",\r\n Float16x2 = \"float16x2\",\r\n Float16x4 = \"float16x4\",\r\n Float32 = \"float32\",\r\n Float32x2 = \"float32x2\",\r\n Float32x3 = \"float32x3\",\r\n Float32x4 = \"float32x4\",\r\n Uint32 = \"uint32\",\r\n Uint32x2 = \"uint32x2\",\r\n Uint32x3 = \"uint32x3\",\r\n Uint32x4 = \"uint32x4\",\r\n Sint32 = \"sint32\",\r\n Sint32x2 = \"sint32x2\",\r\n Sint32x3 = \"sint32x3\",\r\n Sint32x4 = \"sint32x4\",\r\n UNORM10x10x10x2 = \"unorm10-10-10-2\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum VertexStepMode {\r\n Vertex = \"vertex\",\r\n Instance = \"instance\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum ComputePassTimestampLocation {\r\n Beginning = \"beginning\",\r\n End = \"end\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum RenderPassTimestampLocation {\r\n Beginning = \"beginning\",\r\n End = \"end\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum LoadOp {\r\n Load = \"load\",\r\n Clear = \"clear\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum StoreOp {\r\n Store = \"store\",\r\n Discard = \"discard\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum QueryType {\r\n Occlusion = \"occlusion\",\r\n Timestamp = \"timestamp\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum CanvasAlphaMode {\r\n Opaque = \"opaque\",\r\n Premultiplied = \"premultiplied\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum CanvasToneMappingMode {\r\n Standard = \"standard\",\r\n Extended = \"extended\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum DeviceLostReason {\r\n Unknown = \"unknown\",\r\n Destroyed = \"destroyed\",\r\n}\r\n\r\n/** @internal */\r\nexport const enum ErrorFilter {\r\n Validation = \"validation\",\r\n OutOfMemory = \"out-of-memory\",\r\n Internal = \"internal\",\r\n}\r\n"]}
|
|
@@ -85,12 +85,18 @@ export class WebGPUTextureHelper {
|
|
|
85
85
|
return 3;
|
|
86
86
|
// One component = 16 bits unsigned
|
|
87
87
|
case "r16uint" /* WebGPUConstants.TextureFormat.R16Uint */:
|
|
88
|
+
case "r16unorm" /* WebGPUConstants.TextureFormat.R16Unorm */:
|
|
89
|
+
case "rg16unorm" /* WebGPUConstants.TextureFormat.RG16Unorm */:
|
|
90
|
+
case "rgba16unorm" /* WebGPUConstants.TextureFormat.RGBA16Unorm */:
|
|
88
91
|
case "rg16uint" /* WebGPUConstants.TextureFormat.RG16Uint */:
|
|
89
92
|
case "rgba16uint" /* WebGPUConstants.TextureFormat.RGBA16Uint */:
|
|
90
93
|
case "depth16unorm" /* WebGPUConstants.TextureFormat.Depth16Unorm */:
|
|
91
94
|
return 5;
|
|
92
95
|
// One component = 16 bits signed
|
|
93
96
|
case "r16sint" /* WebGPUConstants.TextureFormat.R16Sint */:
|
|
97
|
+
case "r16snorm" /* WebGPUConstants.TextureFormat.R16Snorm */:
|
|
98
|
+
case "rg16snorm" /* WebGPUConstants.TextureFormat.RG16Snorm */:
|
|
99
|
+
case "rgba16snorm" /* WebGPUConstants.TextureFormat.RGBA16Snorm */:
|
|
94
100
|
case "rg16sint" /* WebGPUConstants.TextureFormat.RG16Sint */:
|
|
95
101
|
case "rgba16sint" /* WebGPUConstants.TextureFormat.RGBA16Sint */:
|
|
96
102
|
return 4;
|
|
@@ -130,6 +136,12 @@ export class WebGPUTextureHelper {
|
|
|
130
136
|
// 16 bits formats
|
|
131
137
|
case "r16uint" /* WebGPUConstants.TextureFormat.R16Uint */:
|
|
132
138
|
case "r16sint" /* WebGPUConstants.TextureFormat.R16Sint */:
|
|
139
|
+
case "r16unorm" /* WebGPUConstants.TextureFormat.R16Unorm */:
|
|
140
|
+
case "rg16unorm" /* WebGPUConstants.TextureFormat.RG16Unorm */:
|
|
141
|
+
case "rgba16unorm" /* WebGPUConstants.TextureFormat.RGBA16Unorm */:
|
|
142
|
+
case "r16snorm" /* WebGPUConstants.TextureFormat.R16Snorm */:
|
|
143
|
+
case "rg16snorm" /* WebGPUConstants.TextureFormat.RG16Snorm */:
|
|
144
|
+
case "rgba16snorm" /* WebGPUConstants.TextureFormat.RGBA16Snorm */:
|
|
133
145
|
case "r16float" /* WebGPUConstants.TextureFormat.R16Float */:
|
|
134
146
|
case "rg8unorm" /* WebGPUConstants.TextureFormat.RG8Unorm */:
|
|
135
147
|
case "rg8snorm" /* WebGPUConstants.TextureFormat.RG8Snorm */:
|
|
@@ -561,6 +573,8 @@ export class WebGPUTextureHelper {
|
|
|
561
573
|
case "r16sint" /* WebGPUConstants.TextureFormat.R16Sint */:
|
|
562
574
|
case "depth16unorm" /* WebGPUConstants.TextureFormat.Depth16Unorm */:
|
|
563
575
|
case "r16float" /* WebGPUConstants.TextureFormat.R16Float */:
|
|
576
|
+
case "r16unorm" /* WebGPUConstants.TextureFormat.R16Unorm */:
|
|
577
|
+
case "r16snorm" /* WebGPUConstants.TextureFormat.R16Snorm */:
|
|
564
578
|
case "r32uint" /* WebGPUConstants.TextureFormat.R32Uint */:
|
|
565
579
|
case "r32sint" /* WebGPUConstants.TextureFormat.R32Sint */:
|
|
566
580
|
case "r32float" /* WebGPUConstants.TextureFormat.R32Float */:
|
|
@@ -580,6 +594,8 @@ export class WebGPUTextureHelper {
|
|
|
580
594
|
case "rg16uint" /* WebGPUConstants.TextureFormat.RG16Uint */:
|
|
581
595
|
case "rg16sint" /* WebGPUConstants.TextureFormat.RG16Sint */:
|
|
582
596
|
case "rg16float" /* WebGPUConstants.TextureFormat.RG16Float */:
|
|
597
|
+
case "rg16unorm" /* WebGPUConstants.TextureFormat.RG16Unorm */:
|
|
598
|
+
case "rg16snorm" /* WebGPUConstants.TextureFormat.RG16Snorm */:
|
|
583
599
|
case "rg32uint" /* WebGPUConstants.TextureFormat.RG32Uint */:
|
|
584
600
|
case "rg32sint" /* WebGPUConstants.TextureFormat.RG32Sint */:
|
|
585
601
|
case "rg32float" /* WebGPUConstants.TextureFormat.RG32Float */:
|
|
@@ -601,6 +617,8 @@ export class WebGPUTextureHelper {
|
|
|
601
617
|
case "rgba8sint" /* WebGPUConstants.TextureFormat.RGBA8Sint */:
|
|
602
618
|
case "bgra8unorm" /* WebGPUConstants.TextureFormat.BGRA8Unorm */:
|
|
603
619
|
case "bgra8unorm-srgb" /* WebGPUConstants.TextureFormat.BGRA8UnormSRGB */:
|
|
620
|
+
case "rgba16unorm" /* WebGPUConstants.TextureFormat.RGBA16Unorm */:
|
|
621
|
+
case "rgba16snorm" /* WebGPUConstants.TextureFormat.RGBA16Snorm */:
|
|
604
622
|
case "rgb10a2uint" /* WebGPUConstants.TextureFormat.RGB10A2UINT */:
|
|
605
623
|
case "rgb10a2unorm" /* WebGPUConstants.TextureFormat.RGB10A2Unorm */:
|
|
606
624
|
case "bc7-rgba-unorm" /* WebGPUConstants.TextureFormat.BC7RGBAUnorm */:
|