@itwin/core-frontend 3.5.0-dev.63 → 3.5.0-dev.65
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/CHANGELOG.md +16 -1
- package/lib/cjs/ViewPose.d.ts +62 -10
- package/lib/cjs/ViewPose.d.ts.map +1 -1
- package/lib/cjs/ViewPose.js +37 -8
- package/lib/cjs/ViewPose.js.map +1 -1
- package/lib/cjs/ViewState.d.ts +18 -10
- package/lib/cjs/ViewState.d.ts.map +1 -1
- package/lib/cjs/ViewState.js +17 -13
- package/lib/cjs/ViewState.js.map +1 -1
- package/lib/cjs/render/RenderMaterial.d.ts +3 -1
- package/lib/cjs/render/RenderMaterial.d.ts.map +1 -1
- package/lib/cjs/render/RenderMaterial.js.map +1 -1
- package/lib/cjs/render/RenderTarget.d.ts +1 -0
- package/lib/cjs/render/RenderTarget.d.ts.map +1 -1
- package/lib/cjs/render/RenderTarget.js.map +1 -1
- package/lib/cjs/render/webgl/MeshData.d.ts +1 -0
- package/lib/cjs/render/webgl/MeshData.d.ts.map +1 -1
- package/lib/cjs/render/webgl/MeshData.js +13 -0
- package/lib/cjs/render/webgl/MeshData.js.map +1 -1
- package/lib/cjs/render/webgl/MeshGeometry.d.ts +1 -0
- package/lib/cjs/render/webgl/MeshGeometry.d.ts.map +1 -1
- package/lib/cjs/render/webgl/MeshGeometry.js +1 -0
- package/lib/cjs/render/webgl/MeshGeometry.js.map +1 -1
- package/lib/cjs/render/webgl/RenderFlags.d.ts +2 -1
- package/lib/cjs/render/webgl/RenderFlags.d.ts.map +1 -1
- package/lib/cjs/render/webgl/RenderFlags.js +2 -0
- package/lib/cjs/render/webgl/RenderFlags.js.map +1 -1
- package/lib/cjs/render/webgl/ShaderBuilder.d.ts +2 -1
- package/lib/cjs/render/webgl/ShaderBuilder.d.ts.map +1 -1
- package/lib/cjs/render/webgl/ShaderBuilder.js +6 -1
- package/lib/cjs/render/webgl/ShaderBuilder.js.map +1 -1
- package/lib/cjs/render/webgl/SurfaceGeometry.d.ts +3 -0
- package/lib/cjs/render/webgl/SurfaceGeometry.d.ts.map +1 -1
- package/lib/cjs/render/webgl/SurfaceGeometry.js +16 -1
- package/lib/cjs/render/webgl/SurfaceGeometry.js.map +1 -1
- package/lib/cjs/render/webgl/System.d.ts.map +1 -1
- package/lib/cjs/render/webgl/System.js +1 -0
- package/lib/cjs/render/webgl/System.js.map +1 -1
- package/lib/cjs/render/webgl/Target.d.ts +1 -0
- package/lib/cjs/render/webgl/Target.d.ts.map +1 -1
- package/lib/cjs/render/webgl/Target.js +1 -0
- package/lib/cjs/render/webgl/Target.js.map +1 -1
- package/lib/cjs/render/webgl/glsl/Animation.d.ts.map +1 -1
- package/lib/cjs/render/webgl/glsl/Animation.js +2 -1
- package/lib/cjs/render/webgl/glsl/Animation.js.map +1 -1
- package/lib/cjs/render/webgl/glsl/Common.d.ts +3 -1
- package/lib/cjs/render/webgl/glsl/Common.d.ts.map +1 -1
- package/lib/cjs/render/webgl/glsl/Common.js +28 -33
- package/lib/cjs/render/webgl/glsl/Common.js.map +1 -1
- package/lib/cjs/render/webgl/glsl/Lighting.d.ts.map +1 -1
- package/lib/cjs/render/webgl/glsl/Lighting.js +6 -8
- package/lib/cjs/render/webgl/glsl/Lighting.js.map +1 -1
- package/lib/cjs/render/webgl/glsl/PointCloud.js +1 -1
- package/lib/cjs/render/webgl/glsl/PointCloud.js.map +1 -1
- package/lib/cjs/render/webgl/glsl/RealityMesh.d.ts +1 -0
- package/lib/cjs/render/webgl/glsl/RealityMesh.d.ts.map +1 -1
- package/lib/cjs/render/webgl/glsl/RealityMesh.js +6 -1
- package/lib/cjs/render/webgl/glsl/RealityMesh.js.map +1 -1
- package/lib/cjs/render/webgl/glsl/SolarShadowMapping.d.ts.map +1 -1
- package/lib/cjs/render/webgl/glsl/SolarShadowMapping.js +1 -4
- package/lib/cjs/render/webgl/glsl/SolarShadowMapping.js.map +1 -1
- package/lib/cjs/render/webgl/glsl/Surface.d.ts +1 -1
- package/lib/cjs/render/webgl/glsl/Surface.d.ts.map +1 -1
- package/lib/cjs/render/webgl/glsl/Surface.js +86 -14
- package/lib/cjs/render/webgl/glsl/Surface.js.map +1 -1
- package/lib/cjs/render/webgl/glsl/Thematic.d.ts.map +1 -1
- package/lib/cjs/render/webgl/glsl/Thematic.js +2 -6
- package/lib/cjs/render/webgl/glsl/Thematic.js.map +1 -1
- package/lib/cjs/tile/GltfReader.d.ts +4 -2
- package/lib/cjs/tile/GltfReader.d.ts.map +1 -1
- package/lib/cjs/tile/GltfReader.js +62 -21
- package/lib/cjs/tile/GltfReader.js.map +1 -1
- package/lib/cjs/tile/ImdlReader.d.ts.map +1 -1
- package/lib/cjs/tile/ImdlReader.js +1 -0
- package/lib/cjs/tile/ImdlReader.js.map +1 -1
- package/lib/esm/ViewPose.d.ts +62 -10
- package/lib/esm/ViewPose.d.ts.map +1 -1
- package/lib/esm/ViewPose.js +37 -8
- package/lib/esm/ViewPose.js.map +1 -1
- package/lib/esm/ViewState.d.ts +18 -10
- package/lib/esm/ViewState.d.ts.map +1 -1
- package/lib/esm/ViewState.js +17 -13
- package/lib/esm/ViewState.js.map +1 -1
- package/lib/esm/render/RenderMaterial.d.ts +3 -1
- package/lib/esm/render/RenderMaterial.d.ts.map +1 -1
- package/lib/esm/render/RenderMaterial.js.map +1 -1
- package/lib/esm/render/RenderTarget.d.ts +1 -0
- package/lib/esm/render/RenderTarget.d.ts.map +1 -1
- package/lib/esm/render/RenderTarget.js.map +1 -1
- package/lib/esm/render/webgl/MeshData.d.ts +1 -0
- package/lib/esm/render/webgl/MeshData.d.ts.map +1 -1
- package/lib/esm/render/webgl/MeshData.js +13 -0
- package/lib/esm/render/webgl/MeshData.js.map +1 -1
- package/lib/esm/render/webgl/MeshGeometry.d.ts +1 -0
- package/lib/esm/render/webgl/MeshGeometry.d.ts.map +1 -1
- package/lib/esm/render/webgl/MeshGeometry.js +1 -0
- package/lib/esm/render/webgl/MeshGeometry.js.map +1 -1
- package/lib/esm/render/webgl/RenderFlags.d.ts +2 -1
- package/lib/esm/render/webgl/RenderFlags.d.ts.map +1 -1
- package/lib/esm/render/webgl/RenderFlags.js +2 -0
- package/lib/esm/render/webgl/RenderFlags.js.map +1 -1
- package/lib/esm/render/webgl/ShaderBuilder.d.ts +2 -1
- package/lib/esm/render/webgl/ShaderBuilder.d.ts.map +1 -1
- package/lib/esm/render/webgl/ShaderBuilder.js +6 -1
- package/lib/esm/render/webgl/ShaderBuilder.js.map +1 -1
- package/lib/esm/render/webgl/SurfaceGeometry.d.ts +3 -0
- package/lib/esm/render/webgl/SurfaceGeometry.d.ts.map +1 -1
- package/lib/esm/render/webgl/SurfaceGeometry.js +16 -1
- package/lib/esm/render/webgl/SurfaceGeometry.js.map +1 -1
- package/lib/esm/render/webgl/System.d.ts.map +1 -1
- package/lib/esm/render/webgl/System.js +1 -0
- package/lib/esm/render/webgl/System.js.map +1 -1
- package/lib/esm/render/webgl/Target.d.ts +1 -0
- package/lib/esm/render/webgl/Target.d.ts.map +1 -1
- package/lib/esm/render/webgl/Target.js +1 -0
- package/lib/esm/render/webgl/Target.js.map +1 -1
- package/lib/esm/render/webgl/glsl/Animation.d.ts.map +1 -1
- package/lib/esm/render/webgl/glsl/Animation.js +2 -1
- package/lib/esm/render/webgl/glsl/Animation.js.map +1 -1
- package/lib/esm/render/webgl/glsl/Common.d.ts +3 -1
- package/lib/esm/render/webgl/glsl/Common.d.ts.map +1 -1
- package/lib/esm/render/webgl/glsl/Common.js +25 -31
- package/lib/esm/render/webgl/glsl/Common.js.map +1 -1
- package/lib/esm/render/webgl/glsl/Lighting.d.ts.map +1 -1
- package/lib/esm/render/webgl/glsl/Lighting.js +6 -8
- package/lib/esm/render/webgl/glsl/Lighting.js.map +1 -1
- package/lib/esm/render/webgl/glsl/PointCloud.js +1 -1
- package/lib/esm/render/webgl/glsl/PointCloud.js.map +1 -1
- package/lib/esm/render/webgl/glsl/RealityMesh.d.ts +1 -0
- package/lib/esm/render/webgl/glsl/RealityMesh.d.ts.map +1 -1
- package/lib/esm/render/webgl/glsl/RealityMesh.js +5 -0
- package/lib/esm/render/webgl/glsl/RealityMesh.js.map +1 -1
- package/lib/esm/render/webgl/glsl/SolarShadowMapping.d.ts.map +1 -1
- package/lib/esm/render/webgl/glsl/SolarShadowMapping.js +1 -4
- package/lib/esm/render/webgl/glsl/SolarShadowMapping.js.map +1 -1
- package/lib/esm/render/webgl/glsl/Surface.d.ts +1 -1
- package/lib/esm/render/webgl/glsl/Surface.d.ts.map +1 -1
- package/lib/esm/render/webgl/glsl/Surface.js +87 -15
- package/lib/esm/render/webgl/glsl/Surface.js.map +1 -1
- package/lib/esm/render/webgl/glsl/Thematic.d.ts.map +1 -1
- package/lib/esm/render/webgl/glsl/Thematic.js +2 -6
- package/lib/esm/render/webgl/glsl/Thematic.js.map +1 -1
- package/lib/esm/tile/GltfReader.d.ts +4 -2
- package/lib/esm/tile/GltfReader.d.ts.map +1 -1
- package/lib/esm/tile/GltfReader.js +62 -21
- package/lib/esm/tile/GltfReader.js.map +1 -1
- package/lib/esm/tile/ImdlReader.d.ts.map +1 -1
- package/lib/esm/tile/ImdlReader.js +1 -0
- package/lib/esm/tile/ImdlReader.js.map +1 -1
- package/package.json +20 -20
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module Rendering
|
|
3
3
|
*/
|
|
4
4
|
import { Id64String } from "@itwin/core-bentley";
|
|
5
|
-
import { ColorDef, RenderTexture, RgbColorProps, TextureMapping } from "@itwin/core-common";
|
|
5
|
+
import { ColorDef, NormalMapParams, RenderTexture, RgbColorProps, TextureMapping } from "@itwin/core-common";
|
|
6
6
|
import { IModelConnection } from "../IModelConnection";
|
|
7
7
|
/** Specifies the provenance of a [RenderMaterial]($common) created for a persistent material element.
|
|
8
8
|
* @see [[CreateRenderMaterialArgs.source]].
|
|
@@ -49,6 +49,8 @@ export interface MaterialSpecularProps {
|
|
|
49
49
|
export interface MaterialTextureMappingProps {
|
|
50
50
|
/** The texture from which the image is obtained. */
|
|
51
51
|
texture: RenderTexture;
|
|
52
|
+
/** The parameters describing a normal map to use either in place of or in addition to the texture. */
|
|
53
|
+
normalMapParams?: NormalMapParams;
|
|
52
54
|
/** The mode controlling how the image is mapped onto the surface.
|
|
53
55
|
* Default: [TextureMapping.Mode.Parametric]($common).
|
|
54
56
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderMaterial.d.ts","sourceRoot":"","sources":["../../../src/render/RenderMaterial.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"RenderMaterial.d.ts","sourceRoot":"","sources":["../../../src/render/RenderMaterial.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,gBAAgB,CAAC;IACzB,EAAE,EAAE,UAAU,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,+GAA+G;IAC/G,KAAK,CAAC,EAAE,QAAQ,GAAG,aAAa,CAAC;IAEjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,aAAa,CAAC;IAEjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,oDAAoD;IACpD,OAAO,EAAE,aAAa,CAAC;IAEvB,sGAAsG;IACtG,eAAe,CAAC,EAAE,eAAe,CAAC;IAElC;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC;IAE3B;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC;IAEpC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,gBAAgB;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAE9B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,kGAAkG;IAClG,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAE/B,mGAAmG;IACnG,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IAEjC,8FAA8F;IAC9F,cAAc,CAAC,EAAE,2BAA2B,CAAC;CAC9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderMaterial.js","sourceRoot":"","sources":["../../../src/render/RenderMaterial.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { ColorDef, RenderTexture, RgbColorProps, TextureMapping } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\n\r\n/** Specifies the provenance of a [RenderMaterial]($common) created for a persistent material element.\r\n * @see [[CreateRenderMaterialArgs.source]].\r\n * @internal\r\n */\r\nexport interface RenderMaterialSource {\r\n iModel: IModelConnection;\r\n id: Id64String;\r\n}\r\n\r\n/** Describes the [diffuse](https://en.wikipedia.org/wiki/Diffuse_reflection) properties of a [RenderMaterial]($common).\r\n * @see [[CreateRenderMaterialArgs.diffuse]].\r\n * @public\r\n */\r\nexport interface MaterialDiffuseProps {\r\n /** The diffuse color. If defined, this overrides the color of any surface to which the material is applied. */\r\n color?: ColorDef | RgbColorProps;\r\n\r\n /** A multiplier in [0..1] specifying how strongly the diffuse color reflects light.\r\n * Default: 0.6\r\n */\r\n weight?: number;\r\n}\r\n\r\n/** Describes the [specular](https://en.wikipedia.org/wiki/Specular_highlight) properties of a material.\r\n * @see [[CreateRenderMaterialArgs.specular]].\r\n * @public\r\n */\r\nexport interface MaterialSpecularProps {\r\n /** The color of the specular reflections.\r\n * Default: white.\r\n */\r\n color?: ColorDef | RgbColorProps;\r\n\r\n /** A multiplier in [0..1] specifying the strength of the specular reflections.\r\n * Default: 0.4\r\n */\r\n weight?: number;\r\n\r\n /** An exponent in [0..infinity] describing the shininess of the surface.\r\n * Default: 13.5\r\n */\r\n exponent?: number;\r\n}\r\n\r\n/** Describes how to map a [RenderTexture]($common)'s image to the surfaces to which a [RenderMaterial]($common) is applied.\r\n * @see [[CreateRenderMaterialArgs.textureMapping]].\r\n * @public\r\n */\r\nexport interface MaterialTextureMappingProps {\r\n /** The texture from which the image is obtained. */\r\n texture: RenderTexture;\r\n\r\n /** The mode controlling how the image is mapped onto the surface.\r\n * Default: [TextureMapping.Mode.Parametric]($common).\r\n */\r\n mode?: TextureMapping.Mode;\r\n\r\n /** A 2x3 matrix for computing the UV coordinates.\r\n * Default: [TextureMapping.Trans2x3.identity]($common).\r\n */\r\n transform?: TextureMapping.Trans2x3;\r\n\r\n /** The ratio by which the color sampled from the texture image is mixed with the surface's or material's diffuse color.\r\n * A ratio of 1 selects only the texture sample; a ratio of 0 selects only the diffuse color; a ratio of 0.5 mixes them evenly.\r\n * Default: 1.\r\n */\r\n weight?: number;\r\n\r\n /** @internal */\r\n worldMapping?: boolean;\r\n}\r\n\r\n/** Arguments supplied to [[RenderSystem.createRenderMaterial]].\r\n * @public\r\n */\r\nexport interface CreateRenderMaterialArgs {\r\n /** If supplied, the material will be cached on the iModel by its element Id for subsequent reuse.\r\n * @internal\r\n */\r\n source?: RenderMaterialSource;\r\n\r\n /** Specifies the transparency of the material from 0.0 (fully transparent) to 1.0 (fully opaque).\r\n * If defined, this overrides the transparency of any surface to which the material is applied, and is multiplied with the\r\n * transparency of the material's [[textureMapping]] when sampling the texture.\r\n */\r\n alpha?: number;\r\n\r\n /** The [diffuse](https://en.wikipedia.org/wiki/Diffuse_reflection) properties of the material. */\r\n diffuse?: MaterialDiffuseProps;\r\n\r\n /** The [specular](https://en.wikipedia.org/wiki/Specular_highlight) properties of the material. */\r\n specular?: MaterialSpecularProps;\r\n\r\n /** Maps a [RenderTexture]($common) image to the surfaces to which the material is applied. */\r\n textureMapping?: MaterialTextureMappingProps;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"RenderMaterial.js","sourceRoot":"","sources":["../../../src/render/RenderMaterial.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { ColorDef, NormalMapParams, RenderTexture, RgbColorProps, TextureMapping } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\n\r\n/** Specifies the provenance of a [RenderMaterial]($common) created for a persistent material element.\r\n * @see [[CreateRenderMaterialArgs.source]].\r\n * @internal\r\n */\r\nexport interface RenderMaterialSource {\r\n iModel: IModelConnection;\r\n id: Id64String;\r\n}\r\n\r\n/** Describes the [diffuse](https://en.wikipedia.org/wiki/Diffuse_reflection) properties of a [RenderMaterial]($common).\r\n * @see [[CreateRenderMaterialArgs.diffuse]].\r\n * @public\r\n */\r\nexport interface MaterialDiffuseProps {\r\n /** The diffuse color. If defined, this overrides the color of any surface to which the material is applied. */\r\n color?: ColorDef | RgbColorProps;\r\n\r\n /** A multiplier in [0..1] specifying how strongly the diffuse color reflects light.\r\n * Default: 0.6\r\n */\r\n weight?: number;\r\n}\r\n\r\n/** Describes the [specular](https://en.wikipedia.org/wiki/Specular_highlight) properties of a material.\r\n * @see [[CreateRenderMaterialArgs.specular]].\r\n * @public\r\n */\r\nexport interface MaterialSpecularProps {\r\n /** The color of the specular reflections.\r\n * Default: white.\r\n */\r\n color?: ColorDef | RgbColorProps;\r\n\r\n /** A multiplier in [0..1] specifying the strength of the specular reflections.\r\n * Default: 0.4\r\n */\r\n weight?: number;\r\n\r\n /** An exponent in [0..infinity] describing the shininess of the surface.\r\n * Default: 13.5\r\n */\r\n exponent?: number;\r\n}\r\n\r\n/** Describes how to map a [RenderTexture]($common)'s image to the surfaces to which a [RenderMaterial]($common) is applied.\r\n * @see [[CreateRenderMaterialArgs.textureMapping]].\r\n * @public\r\n */\r\nexport interface MaterialTextureMappingProps {\r\n /** The texture from which the image is obtained. */\r\n texture: RenderTexture;\r\n\r\n /** The parameters describing a normal map to use either in place of or in addition to the texture. */\r\n normalMapParams?: NormalMapParams;\r\n\r\n /** The mode controlling how the image is mapped onto the surface.\r\n * Default: [TextureMapping.Mode.Parametric]($common).\r\n */\r\n mode?: TextureMapping.Mode;\r\n\r\n /** A 2x3 matrix for computing the UV coordinates.\r\n * Default: [TextureMapping.Trans2x3.identity]($common).\r\n */\r\n transform?: TextureMapping.Trans2x3;\r\n\r\n /** The ratio by which the color sampled from the texture image is mixed with the surface's or material's diffuse color.\r\n * A ratio of 1 selects only the texture sample; a ratio of 0 selects only the diffuse color; a ratio of 0.5 mixes them evenly.\r\n * Default: 1.\r\n */\r\n weight?: number;\r\n\r\n /** @internal */\r\n worldMapping?: boolean;\r\n}\r\n\r\n/** Arguments supplied to [[RenderSystem.createRenderMaterial]].\r\n * @public\r\n */\r\nexport interface CreateRenderMaterialArgs {\r\n /** If supplied, the material will be cached on the iModel by its element Id for subsequent reuse.\r\n * @internal\r\n */\r\n source?: RenderMaterialSource;\r\n\r\n /** Specifies the transparency of the material from 0.0 (fully transparent) to 1.0 (fully opaque).\r\n * If defined, this overrides the transparency of any surface to which the material is applied, and is multiplied with the\r\n * transparency of the material's [[textureMapping]] when sampling the texture.\r\n */\r\n alpha?: number;\r\n\r\n /** The [diffuse](https://en.wikipedia.org/wiki/Diffuse_reflection) properties of the material. */\r\n diffuse?: MaterialDiffuseProps;\r\n\r\n /** The [specular](https://en.wikipedia.org/wiki/Specular_highlight) properties of the material. */\r\n specular?: MaterialSpecularProps;\r\n\r\n /** Maps a [RenderTexture]($common) image to the surfaces to which the material is applied. */\r\n textureMapping?: MaterialTextureMappingProps;\r\n}\r\n"]}
|
|
@@ -52,6 +52,7 @@ export interface RenderTargetDebugControl {
|
|
|
52
52
|
displayRealityTilePreload: boolean;
|
|
53
53
|
displayRealityTileRanges: boolean;
|
|
54
54
|
logRealityTiles: boolean;
|
|
55
|
+
displayNormalMaps: boolean;
|
|
55
56
|
freezeRealityTiles: boolean;
|
|
56
57
|
/** Obtain a summary of the render commands required to draw the scene currently displayed.
|
|
57
58
|
* Each entry specifies the type of command and the number of such commands required by the current scene.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderTarget.d.ts","sourceRoot":"","sources":["../../../src/render/RenderTarget.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE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e,EAAE,WAAoB,EAAE,eAAwB,IAA6B,OAAO,SAAS,CAAC,CAAC,CAAC;IACzH,eAAe,CAAC,KAA2B,IAA6B,OAAO,SAAS,CAAC,CAAC,CAAC;IAC3F,iBAAiB,KAAwB,OAAO,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACnF,iBAAiB,CAAC,MAA+B,IAAU,CAAC;IAEnE;;;OAGG;IACI,iBAAiB,CAAC,SAAkB,IAAmC,OAAO,SAAS,CAAC,CAAC,CAAC;IAEjG,IAAW,YAAY,KAA2C,OAAO,SAAS,CAAC,CAAC,CAAC;IAUrF;;OAEG;IACI,wBAAwB,CAAC,QAAkC,EAAE,OAAyB,EAAE,QAAsC;QACnI,QAAQ,CAAC,EAAE,CAAC,CAAC;IACf,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String, IDisposable } from \"@itwin/core-bentley\";\r\nimport { Frustum, ImageBuffer, SpatialClassifier } from \"@itwin/core-common\";\r\nimport { Point2d, XAndY } from \"@itwin/core-geometry\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { HiliteSet } from \"../SelectionSet\";\r\nimport { SceneContext } from \"../ViewContext\";\r\nimport { ReadImageBufferArgs, Viewport } from \"../Viewport\";\r\nimport { ViewRect } from \"../ViewRect\";\r\nimport { CanvasDecoration } from \"./CanvasDecoration\";\r\nimport { Decorations } from \"./Decorations\";\r\nimport { FeatureSymbology } from \"./FeatureSymbology\";\r\nimport { FrameStatsCollector } from \"./FrameStats\";\r\nimport { AnimationBranchStates } from \"./GraphicBranch\";\r\nimport { CustomGraphicBuilderOptions, ViewportGraphicBuilderOptions } from \"./GraphicBuilder\";\r\nimport { Pixel } from \"./Pixel\";\r\nimport { GraphicList } from \"./RenderGraphic\";\r\nimport { RenderMemory } from \"./RenderMemory\";\r\nimport { RenderPlan } from \"./RenderPlan\";\r\nimport { RenderPlanarClassifier } from \"./RenderPlanarClassifier\";\r\nimport { RenderSystem, RenderTextureDrape } from \"./RenderSystem\";\r\nimport { Scene } from \"./Scene\";\r\nimport { QueryTileFeaturesOptions, QueryVisibleFeaturesCallback } from \"./VisibleFeature\";\r\n\r\n/** Used for debugging purposes, to toggle display of instanced or batched primitives.\r\n * @see [[RenderTargetDebugControl]].\r\n * @internal\r\n */\r\nexport enum PrimitiveVisibility {\r\n /** Draw all primitives. */\r\n All,\r\n /** Only draw instanced primitives. */\r\n Instanced,\r\n /** Only draw un-instanced primitives. */\r\n Uninstanced,\r\n}\r\n\r\n/** An interface optionally exposed by a RenderTarget that allows control of various debugging features.\r\n * @internal\r\n */\r\nexport interface RenderTargetDebugControl {\r\n /** If true, render to the screen as if rendering off-screen for readPixels(). */\r\n drawForReadPixels: boolean;\r\n primitiveVisibility: PrimitiveVisibility;\r\n vcSupportIntersectingVolumes: boolean;\r\n readonly shadowFrustum: Frustum | undefined;\r\n displayDrapeFrustum: boolean;\r\n /** Override device pixel ratio for on-screen targets only. This supersedes window.devicePixelRatio.\r\n * Undefined clears the override. Chiefly useful for tests.\r\n */\r\n devicePixelRatioOverride?: number;\r\n displayRealityTilePreload: boolean;\r\n displayRealityTileRanges: boolean;\r\n logRealityTiles: boolean;\r\n freezeRealityTiles: boolean;\r\n /** Obtain a summary of the render commands required to draw the scene currently displayed.\r\n * Each entry specifies the type of command and the number of such commands required by the current scene.\r\n */\r\n getRenderCommands(): Array<{ name: string, count: number }>;\r\n}\r\n\r\n/** A RenderTarget connects a [[Viewport]] to a WebGLRenderingContext to enable the viewport's contents to be displayed on the screen.\r\n * Application code rarely interacts directly with a RenderTarget - instead, it interacts with a Viewport which forwards requests to the implementation\r\n * of the RenderTarget.\r\n * @internal\r\n */\r\nexport abstract class RenderTarget implements IDisposable, RenderMemory.Consumer {\r\n public pickOverlayDecoration(_pt: XAndY): CanvasDecoration | undefined { return undefined; }\r\n\r\n public abstract get renderSystem(): RenderSystem;\r\n\r\n /** NB: *Device pixels*, not CSS pixels! */\r\n public abstract get viewRect(): ViewRect;\r\n\r\n public get devicePixelRatio(): number { return 1; }\r\n public cssPixelsToDevicePixels(cssPixels: number, floor = true): number {\r\n const pix = cssPixels * this.devicePixelRatio;\r\n return floor ? Math.floor(pix) : pix;\r\n }\r\n\r\n /** Given the size of a logical pixel in meters, convert it to the size of a physical pixel in meters, if [[RenderSystem.dpiAwareLOD]] is `true`.\r\n * Used when computing LOD for graphics.\r\n */\r\n public adjustPixelSizeForLOD(cssPixelSize: number): number {\r\n return this.renderSystem.dpiAwareLOD ? this.cssPixelsToDevicePixels(cssPixelSize, false) : cssPixelSize;\r\n }\r\n\r\n public abstract get wantInvertBlackBackground(): boolean;\r\n\r\n public abstract get analysisFraction(): number;\r\n public abstract set analysisFraction(fraction: number);\r\n\r\n public get animationBranches(): AnimationBranchStates | undefined { return undefined; }\r\n public set animationBranches(_transforms: AnimationBranchStates | undefined) { }\r\n\r\n public get antialiasSamples(): number { return 1; }\r\n public set antialiasSamples(_numSamples: number) { }\r\n\r\n public assignFrameStatsCollector(_collector: FrameStatsCollector) { }\r\n\r\n /** Update the solar shadow map. If a SceneContext is supplied, shadows are enabled; otherwise, shadows are disabled. */\r\n public updateSolarShadows(_context: SceneContext | undefined): void { }\r\n public getPlanarClassifier(_id: string): RenderPlanarClassifier | undefined { return undefined; }\r\n public createPlanarClassifier(_properties?: SpatialClassifier): RenderPlanarClassifier | undefined { return undefined; }\r\n public getTextureDrape(_id: Id64String): RenderTextureDrape | undefined { return undefined; }\r\n\r\n public createGraphicBuilder(options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions) {\r\n return this.renderSystem.createGraphic(options);\r\n }\r\n\r\n public dispose(): void { }\r\n public reset(): void { }\r\n public abstract changeScene(scene: Scene): void;\r\n public abstract changeDynamics(dynamics?: GraphicList): void;\r\n public abstract changeDecorations(decorations: Decorations): void;\r\n public abstract changeRenderPlan(plan: RenderPlan): void;\r\n public abstract drawFrame(sceneMilSecElapsed?: number): void;\r\n public overrideFeatureSymbology(_ovr: FeatureSymbology.Overrides): void { }\r\n public setHiliteSet(_hilited: HiliteSet): void { }\r\n public setFlashed(_elementId: Id64String, _intensity: number): void { }\r\n public onBeforeRender(_viewport: Viewport, _setSceneNeedRedraw: (redraw: boolean) => void): void { }\r\n public abstract setViewRect(_rect: ViewRect, _temporary: boolean): void;\r\n public onResized(): void { }\r\n public abstract updateViewRect(): boolean; // force a RenderTarget viewRect to resize if necessary since last draw\r\n /** `rect` is specified in *CSS* pixels. */\r\n public abstract readPixels(rect: ViewRect, selector: Pixel.Selector, receiver: Pixel.Receiver, excludeNonLocatable: boolean): void;\r\n /** @deprecated use readImageBuffer */\r\n public readImage(_rect: ViewRect, _targetSize: Point2d, _flipVertically: boolean): ImageBuffer | undefined { return undefined; }\r\n public readImageBuffer(_args?: ReadImageBufferArgs): ImageBuffer | undefined { return undefined; }\r\n public readImageToCanvas(): HTMLCanvasElement { return document.createElement(\"canvas\"); }\r\n public collectStatistics(_stats: RenderMemory.Statistics): void { }\r\n\r\n /** Specify whether webgl content should be rendered directly to the screen.\r\n * If rendering to screen becomes enabled, returns the canvas to which to render the webgl content.\r\n * Returns undefined if rendering to screen becomes disabled, or is not supported by this RenderTarget.\r\n */\r\n public setRenderToScreen(_toScreen: boolean): HTMLCanvasElement | undefined { return undefined; }\r\n\r\n public get debugControl(): RenderTargetDebugControl | undefined { return undefined; }\r\n\r\n /** An ordered list of names of screen-space post-processing effects to be applied to the image produced by this target.\r\n * The effects are applied in the order in which they appear in the list. Any names not corresponding to a registered effect are ignored.\r\n * This may have no effect if this target does not support screen-space effects.\r\n * @see [[RenderSystem.createScreenSpaceEffectBuilder]] to create and register new effects.\r\n */\r\n public abstract get screenSpaceEffects(): Iterable<string>;\r\n public abstract set screenSpaceEffects(_effectNames: Iterable<string>);\r\n\r\n /** Implementation for [[Viewport.queryVisibleFeatures]]. Not intended for direct usage. The returned iterable remains valid only for the duration of the\r\n * Viewport.queryVisibleFeatures call.\r\n */\r\n public queryVisibleTileFeatures(_options: QueryTileFeaturesOptions, _iModel: IModelConnection, callback: QueryVisibleFeaturesCallback): void {\r\n callback([]);\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"RenderTarget.js","sourceRoot":"","sources":["../../../src/render/RenderTarget.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAyBH;;;GAGG;AACH,MAAM,CAAN,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC7B,2BAA2B;IAC3B,2DAAG,CAAA;IACH,sCAAsC;IACtC,uEAAS,CAAA;IACT,yCAAyC;IACzC,2EAAW,CAAA;AACb,CAAC,EAPW,mBAAmB,KAAnB,mBAAmB,QAO9B;AA2BD;;;;GAIG;AACH,MAAM,OAAgB,YAAY;IACzB,qBAAqB,CAAC,GAAU,IAAkC,OAAO,SAAS,CAAC,CAAC,CAAC;IAO5F,IAAW,gBAAgB,KAAa,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5C,uBAAuB,CAAC,SAAiB,EAAE,KAAK,GAAG,IAAI;QAC5D,MAAM,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAC9C,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IACvC,CAAC;IAED;;OAEG;IACI,qBAAqB,CAAC,YAAoB;QAC/C,OAAO,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC;IAC1G,CAAC;IAOD,IAAW,iBAAiB,KAAwC,OAAO,SAAS,CAAC,CAAC,CAAC;IACvF,IAAW,iBA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BAAwB,CAAC,QAAkC,EAAE,OAAyB,EAAE,QAAsC;QACnI,QAAQ,CAAC,EAAE,CAAC,CAAC;IACf,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String, IDisposable } from \"@itwin/core-bentley\";\r\nimport { Frustum, ImageBuffer, SpatialClassifier } from \"@itwin/core-common\";\r\nimport { Point2d, XAndY } from \"@itwin/core-geometry\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { HiliteSet } from \"../SelectionSet\";\r\nimport { SceneContext } from \"../ViewContext\";\r\nimport { ReadImageBufferArgs, Viewport } from \"../Viewport\";\r\nimport { ViewRect } from \"../ViewRect\";\r\nimport { CanvasDecoration } from \"./CanvasDecoration\";\r\nimport { Decorations } from \"./Decorations\";\r\nimport { FeatureSymbology } from \"./FeatureSymbology\";\r\nimport { FrameStatsCollector } from \"./FrameStats\";\r\nimport { AnimationBranchStates } from \"./GraphicBranch\";\r\nimport { CustomGraphicBuilderOptions, ViewportGraphicBuilderOptions } from \"./GraphicBuilder\";\r\nimport { Pixel } from \"./Pixel\";\r\nimport { GraphicList } from \"./RenderGraphic\";\r\nimport { RenderMemory } from \"./RenderMemory\";\r\nimport { RenderPlan } from \"./RenderPlan\";\r\nimport { RenderPlanarClassifier } from \"./RenderPlanarClassifier\";\r\nimport { RenderSystem, RenderTextureDrape } from \"./RenderSystem\";\r\nimport { Scene } from \"./Scene\";\r\nimport { QueryTileFeaturesOptions, QueryVisibleFeaturesCallback } from \"./VisibleFeature\";\r\n\r\n/** Used for debugging purposes, to toggle display of instanced or batched primitives.\r\n * @see [[RenderTargetDebugControl]].\r\n * @internal\r\n */\r\nexport enum PrimitiveVisibility {\r\n /** Draw all primitives. */\r\n All,\r\n /** Only draw instanced primitives. */\r\n Instanced,\r\n /** Only draw un-instanced primitives. */\r\n Uninstanced,\r\n}\r\n\r\n/** An interface optionally exposed by a RenderTarget that allows control of various debugging features.\r\n * @internal\r\n */\r\nexport interface RenderTargetDebugControl {\r\n /** If true, render to the screen as if rendering off-screen for readPixels(). */\r\n drawForReadPixels: boolean;\r\n primitiveVisibility: PrimitiveVisibility;\r\n vcSupportIntersectingVolumes: boolean;\r\n readonly shadowFrustum: Frustum | undefined;\r\n displayDrapeFrustum: boolean;\r\n /** Override device pixel ratio for on-screen targets only. This supersedes window.devicePixelRatio.\r\n * Undefined clears the override. Chiefly useful for tests.\r\n */\r\n devicePixelRatioOverride?: number;\r\n displayRealityTilePreload: boolean;\r\n displayRealityTileRanges: boolean;\r\n logRealityTiles: boolean;\r\n displayNormalMaps: boolean;\r\n freezeRealityTiles: boolean;\r\n /** Obtain a summary of the render commands required to draw the scene currently displayed.\r\n * Each entry specifies the type of command and the number of such commands required by the current scene.\r\n */\r\n getRenderCommands(): Array<{ name: string, count: number }>;\r\n}\r\n\r\n/** A RenderTarget connects a [[Viewport]] to a WebGLRenderingContext to enable the viewport's contents to be displayed on the screen.\r\n * Application code rarely interacts directly with a RenderTarget - instead, it interacts with a Viewport which forwards requests to the implementation\r\n * of the RenderTarget.\r\n * @internal\r\n */\r\nexport abstract class RenderTarget implements IDisposable, RenderMemory.Consumer {\r\n public pickOverlayDecoration(_pt: XAndY): CanvasDecoration | undefined { return undefined; }\r\n\r\n public abstract get renderSystem(): RenderSystem;\r\n\r\n /** NB: *Device pixels*, not CSS pixels! */\r\n public abstract get viewRect(): ViewRect;\r\n\r\n public get devicePixelRatio(): number { return 1; }\r\n public cssPixelsToDevicePixels(cssPixels: number, floor = true): number {\r\n const pix = cssPixels * this.devicePixelRatio;\r\n return floor ? Math.floor(pix) : pix;\r\n }\r\n\r\n /** Given the size of a logical pixel in meters, convert it to the size of a physical pixel in meters, if [[RenderSystem.dpiAwareLOD]] is `true`.\r\n * Used when computing LOD for graphics.\r\n */\r\n public adjustPixelSizeForLOD(cssPixelSize: number): number {\r\n return this.renderSystem.dpiAwareLOD ? this.cssPixelsToDevicePixels(cssPixelSize, false) : cssPixelSize;\r\n }\r\n\r\n public abstract get wantInvertBlackBackground(): boolean;\r\n\r\n public abstract get analysisFraction(): number;\r\n public abstract set analysisFraction(fraction: number);\r\n\r\n public get animationBranches(): AnimationBranchStates | undefined { return undefined; }\r\n public set animationBranches(_transforms: AnimationBranchStates | undefined) { }\r\n\r\n public get antialiasSamples(): number { return 1; }\r\n public set antialiasSamples(_numSamples: number) { }\r\n\r\n public assignFrameStatsCollector(_collector: FrameStatsCollector) { }\r\n\r\n /** Update the solar shadow map. If a SceneContext is supplied, shadows are enabled; otherwise, shadows are disabled. */\r\n public updateSolarShadows(_context: SceneContext | undefined): void { }\r\n public getPlanarClassifier(_id: string): RenderPlanarClassifier | undefined { return undefined; }\r\n public createPlanarClassifier(_properties?: SpatialClassifier): RenderPlanarClassifier | undefined { return undefined; }\r\n public getTextureDrape(_id: Id64String): RenderTextureDrape | undefined { return undefined; }\r\n\r\n public createGraphicBuilder(options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions) {\r\n return this.renderSystem.createGraphic(options);\r\n }\r\n\r\n public dispose(): void { }\r\n public reset(): void { }\r\n public abstract changeScene(scene: Scene): void;\r\n public abstract changeDynamics(dynamics?: GraphicList): void;\r\n public abstract changeDecorations(decorations: Decorations): void;\r\n public abstract changeRenderPlan(plan: RenderPlan): void;\r\n public abstract drawFrame(sceneMilSecElapsed?: number): void;\r\n public overrideFeatureSymbology(_ovr: FeatureSymbology.Overrides): void { }\r\n public setHiliteSet(_hilited: HiliteSet): void { }\r\n public setFlashed(_elementId: Id64String, _intensity: number): void { }\r\n public onBeforeRender(_viewport: Viewport, _setSceneNeedRedraw: (redraw: boolean) => void): void { }\r\n public abstract setViewRect(_rect: ViewRect, _temporary: boolean): void;\r\n public onResized(): void { }\r\n public abstract updateViewRect(): boolean; // force a RenderTarget viewRect to resize if necessary since last draw\r\n /** `rect` is specified in *CSS* pixels. */\r\n public abstract readPixels(rect: ViewRect, selector: Pixel.Selector, receiver: Pixel.Receiver, excludeNonLocatable: boolean): void;\r\n /** @deprecated use readImageBuffer */\r\n public readImage(_rect: ViewRect, _targetSize: Point2d, _flipVertically: boolean): ImageBuffer | undefined { return undefined; }\r\n public readImageBuffer(_args?: ReadImageBufferArgs): ImageBuffer | undefined { return undefined; }\r\n public readImageToCanvas(): HTMLCanvasElement { return document.createElement(\"canvas\"); }\r\n public collectStatistics(_stats: RenderMemory.Statistics): void { }\r\n\r\n /** Specify whether webgl content should be rendered directly to the screen.\r\n * If rendering to screen becomes enabled, returns the canvas to which to render the webgl content.\r\n * Returns undefined if rendering to screen becomes disabled, or is not supported by this RenderTarget.\r\n */\r\n public setRenderToScreen(_toScreen: boolean): HTMLCanvasElement | undefined { return undefined; }\r\n\r\n public get debugControl(): RenderTargetDebugControl | undefined { return undefined; }\r\n\r\n /** An ordered list of names of screen-space post-processing effects to be applied to the image produced by this target.\r\n * The effects are applied in the order in which they appear in the list. Any names not corresponding to a registered effect are ignored.\r\n * This may have no effect if this target does not support screen-space effects.\r\n * @see [[RenderSystem.createScreenSpaceEffectBuilder]] to create and register new effects.\r\n */\r\n public abstract get screenSpaceEffects(): Iterable<string>;\r\n public abstract set screenSpaceEffects(_effectNames: Iterable<string>);\r\n\r\n /** Implementation for [[Viewport.queryVisibleFeatures]]. Not intended for direct usage. The returned iterable remains valid only for the duration of the\r\n * Viewport.queryVisibleFeatures call.\r\n */\r\n public queryVisibleTileFeatures(_options: QueryTileFeaturesOptions, _iModel: IModelConnection, callback: QueryVisibleFeaturesCallback): void {\r\n callback([]);\r\n }\r\n}\r\n"]}
|
|
@@ -16,6 +16,7 @@ export declare class MeshData implements WebGLDisposable {
|
|
|
16
16
|
readonly hasFeatures: boolean;
|
|
17
17
|
readonly uniformFeatureId?: number;
|
|
18
18
|
readonly texture?: Texture;
|
|
19
|
+
readonly normalMap?: Texture;
|
|
19
20
|
readonly materialInfo?: MaterialInfo;
|
|
20
21
|
readonly type: SurfaceType;
|
|
21
22
|
readonly fillFlags: FillFlags;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MeshData.d.ts","sourceRoot":"","sources":["../../../../src/render/webgl/MeshData.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAoB,SAAS,EAAc,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAsB,YAAY,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,gBAAgB;AAChB,qBAAa,QAAS,YAAW,eAAe;IAC9C,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,WAAW,EAAE,OAAO,CAAC;IACrC,SAAgB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1C,SAAgB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClC,SAAgB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5C,SAAgB,IAAI,EAAE,WAAW,CAAC;IAClC,SAAgB,SAAS,EAAE,SAAS,CAAC;IACrC,SAAgB,YAAY,EAAE,MAAM,CAAC;IACrC,SAAgB,QAAQ,EAAE,OAAO,CAAC;IAClC,SAAgB,gBAAgB,EAAE,OAAO,CAAC;IAC1C,SAAgB,GAAG,EAAE,SAAS,CAAC;IAC/B,SAAgB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChD,OAAO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,OAAO;WAuCO,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS;IAK7F,IAAW,UAAU,IAAI,OAAO,CAA8D;IAEvF,OAAO;IAMd,IAAW,OAAO,YAAiE;IACnF,IAAW,wBAAwB,YAA2D;IAG9F,OAAO,KAAK,YAAY,GAEvB;IAEM,iBAAiB,CAAC,KAAK,EAAE,YAAY,CAAC,UAAU,GAAG,IAAI;CAK/D"}
|
|
@@ -21,6 +21,19 @@ export class MeshData {
|
|
|
21
21
|
if (undefined !== params.surface.textureMapping) {
|
|
22
22
|
this.texture = params.surface.textureMapping.texture;
|
|
23
23
|
this._textureAlwaysDisplayed = params.surface.textureMapping.alwaysDisplayed;
|
|
24
|
+
if (undefined !== params.surface.material && !params.surface.material.isAtlas) {
|
|
25
|
+
const matTM = params.surface.material.material.textureMapping;
|
|
26
|
+
if (undefined !== matTM && undefined !== matTM.normalMapParams) {
|
|
27
|
+
if (undefined !== matTM.normalMapParams.normalMap) {
|
|
28
|
+
this.normalMap = matTM.normalMapParams.normalMap;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
// If there are normal map params but the normal map is not present, use the texture as a normal map instead of a pattern map.
|
|
32
|
+
this.normalMap = this.texture;
|
|
33
|
+
this.texture = undefined;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
24
37
|
}
|
|
25
38
|
else {
|
|
26
39
|
this.texture = undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MeshData.js","sourceRoot":"","sources":["../../../../src/render/webgl/MeshData.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAa,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAK7E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,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/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module WebGL\r\n */\r\n\r\nimport { dispose } from \"@itwin/core-bentley\";\r\nimport { Point3d } from \"@itwin/core-geometry\";\r\nimport { FeatureIndexType, FillFlags, LinePixels } from \"@itwin/core-common\";\r\nimport { MeshParams } from \"../primitives/VertexTable\";\r\nimport { SurfaceType } from \"../primitives/SurfaceParams\";\r\nimport { RenderMemory } from \"../RenderMemory\";\r\nimport { WebGLDisposable } from \"./Disposable\";\r\nimport { LineCode } from \"./LineCode\";\r\nimport { createMaterialInfo, MaterialInfo } from \"./Material\";\r\nimport { Texture } from \"./Texture\";\r\nimport { VertexLUT } from \"./VertexLUT\";\r\n\r\n/** @internal */\r\nexport class MeshData implements WebGLDisposable {\r\n public readonly edgeWidth: number;\r\n public readonly hasFeatures: boolean;\r\n public readonly uniformFeatureId?: number; // Used strictly by BatchPrimitiveCommand.computeIsFlashed for flashing volume classification primitives.\r\n public readonly texture?: Texture;\r\n public readonly normalMap?: Texture;\r\n public readonly materialInfo?: MaterialInfo;\r\n public readonly type: SurfaceType;\r\n public readonly fillFlags: FillFlags;\r\n public readonly edgeLineCode: number; // Must call LineCode.valueFromLinePixels(val: LinePixels) and set the output to edgeLineCode\r\n public readonly isPlanar: boolean;\r\n public readonly hasBakedLighting: boolean;\r\n public readonly lut: VertexLUT;\r\n public readonly viewIndependentOrigin?: Point3d;\r\n private readonly _textureAlwaysDisplayed: boolean;\r\n\r\n private constructor(lut: VertexLUT, params: MeshParams, viOrigin: Point3d | undefined) {\r\n this.lut = lut;\r\n this.viewIndependentOrigin = viOrigin;\r\n\r\n this.hasFeatures = FeatureIndexType.Empty !== params.vertices.featureIndexType;\r\n if (FeatureIndexType.Uniform === params.vertices.featureIndexType)\r\n this.uniformFeatureId = params.vertices.uniformFeatureID;\r\n\r\n if (undefined !== params.surface.textureMapping) {\r\n this.texture = params.surface.textureMapping.texture as Texture;\r\n this._textureAlwaysDisplayed = params.surface.textureMapping.alwaysDisplayed;\r\n if (undefined !== params.surface.material && !params.surface.material.isAtlas) {\r\n const matTM = params.surface.material.material.textureMapping;\r\n if (undefined !== matTM && undefined !== matTM.normalMapParams) {\r\n if (undefined !== matTM.normalMapParams.normalMap) {\r\n this.normalMap = matTM.normalMapParams.normalMap as Texture;\r\n } else {\r\n // If there are normal map params but the normal map is not present, use the texture as a normal map instead of a pattern map.\r\n this.normalMap = this.texture;\r\n this.texture = undefined;\r\n }\r\n }\r\n }\r\n } else {\r\n this.texture = undefined;\r\n this._textureAlwaysDisplayed = false;\r\n }\r\n\r\n this.materialInfo = createMaterialInfo(params.surface.material);\r\n\r\n this.type = params.surface.type;\r\n this.fillFlags = params.surface.fillFlags;\r\n this.isPlanar = params.isPlanar;\r\n this.hasBakedLighting = params.surface.hasBakedLighting;\r\n const edges = params.edges;\r\n this.edgeWidth = undefined !== edges ? edges.weight : 1;\r\n this.edgeLineCode = LineCode.valueFromLinePixels(undefined !== edges ? edges.linePixels : LinePixels.Solid);\r\n }\r\n\r\n public static create(params: MeshParams, viOrigin: Point3d | undefined): MeshData | undefined {\r\n const lut = VertexLUT.createFromVertexTable(params.vertices, params.auxChannels);\r\n return undefined !== lut ? new MeshData(lut, params, viOrigin) : undefined;\r\n }\r\n\r\n public get isDisposed(): boolean { return undefined === this.texture && this.lut.isDisposed; }\r\n\r\n public dispose() {\r\n dispose(this.lut);\r\n if (this._ownsTexture)\r\n this.texture!.dispose();\r\n }\r\n\r\n public get isGlyph() { return undefined !== this.texture && this.texture.isGlyph; }\r\n public get isTextureAlwaysDisplayed() { return this.isGlyph || this._textureAlwaysDisplayed; }\r\n\r\n // Returns true if no one else owns this texture. Implies that the texture should be disposed when this object is disposed, and the texture's memory should be tracked as belonging to this object.\r\n private get _ownsTexture(): boolean {\r\n return undefined !== this.texture && !this.texture?.hasOwner;\r\n }\r\n\r\n public collectStatistics(stats: RenderMemory.Statistics): void {\r\n stats.addVertexTable(this.lut.bytesUsed);\r\n if (this._ownsTexture)\r\n stats.addTexture(this.texture!.bytesUsed);\r\n }\r\n}\r\n"]}
|
|
@@ -25,6 +25,7 @@ export declare abstract class MeshGeometry extends LUTGeometry {
|
|
|
25
25
|
get colorInfo(): ColorInfo;
|
|
26
26
|
get uniformColor(): FloatRgba | undefined;
|
|
27
27
|
get texture(): import("./Texture").Texture | undefined;
|
|
28
|
+
get normalMap(): import("./Texture").Texture | undefined;
|
|
28
29
|
get hasBakedLighting(): boolean;
|
|
29
30
|
get lut(): import("./VertexLUT").VertexLUT;
|
|
30
31
|
get hasScalarAnimation(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MeshGeometry.d.ts","sourceRoot":"","sources":["../../../../src/render/webgl/MeshGeometry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;GAEG;AACH,8BAAsB,YAAa,SAAQ,WAAW;IACpD,SAAgB,IAAI,EAAE,QAAQ,CAAC;IAC/B,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAEvC,IAAoB,MAAM,SAAmB;cAC1B,cAAc,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM;IAGtE,IAAW,SAAS,WAAkC;IACtD,IAAW,YAAY,WAAqC;IAC5D,IAAoB,WAAW,YAAoC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B;cAC1B,cAAc,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM;IAGtE,IAAW,SAAS,WAAkC;IACtD,IAAW,YAAY,WAAqC;IAC5D,IAAoB,WAAW,YAAoC;IACnE,IAAW,WAAW,sDAA6B;IACnD,IAAW,SAAS,2CAAkC;IACtD,IAAW,QAAQ,YAAiC;IACpD,IAAW,SAAS,IAAI,SAAS,CAAoC;IACrE,IAAW,YAAY,IAAI,SAAS,GAAG,SAAS,CAA0E;IAC1H,IAAW,OAAO,4CAAgC;IAClD,IAAW,SAAS,4CAAkC;IACtD,IAAoB,gBAAgB,YAAyC;IAC7E,IAAW,GAAG,oCAA4B;IAC1C,IAAW,kBAAkB,YAA+C;IAE5E,SAAS,aAAa,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM;IAMxD,SAAS,CAAC,iBAAiB,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM;IAGhE,SAAS,CAAC,mBAAmB,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM;IAGlE,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS;IAGrD,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAYhD"}
|
|
@@ -28,6 +28,7 @@ export class MeshGeometry extends LUTGeometry {
|
|
|
28
28
|
get colorInfo() { return this.mesh.lut.colorInfo; }
|
|
29
29
|
get uniformColor() { return this.colorInfo.isUniform ? this.colorInfo.uniform : undefined; }
|
|
30
30
|
get texture() { return this.mesh.texture; }
|
|
31
|
+
get normalMap() { return this.mesh.normalMap; }
|
|
31
32
|
get hasBakedLighting() { return this.mesh.hasBakedLighting; }
|
|
32
33
|
get lut() { return this.mesh.lut; }
|
|
33
34
|
get hasScalarAnimation() { return this.mesh.lut.hasScalarAnimation; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MeshGeometry.js","sourceRoot":"","sources":["../../../../src/render/webgl/MeshGeometry.ts"],"names":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AAM,CAAC,gBAAgB,CAAC;QACnC,IAAI,UAAU,CAAC,WAAW,KAAK,EAAE,CAAC,UAAU,IAAI,CAAC,EAAE,CAAC,YAAY;YAC9D,OAAO,MAAM,CAAC;QAEhB,iDAAiD;QACjD,MAAM,aAAa,GAAG,UAAU,CAAC,SAAS,KAAK,EAAE,CAAC,UAAU,IAAI,EAAE,CAAC,YAAY,IAAI,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC;QAClH,OAAO,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC;IACzD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module WebGL\r\n */\r\n\r\nimport { RenderMode } from \"@itwin/core-common\";\r\nimport { LUTGeometry } from \"./CachedGeometry\";\r\nimport { ColorInfo } from \"./ColorInfo\";\r\nimport { ShaderProgramParams } from \"./DrawCommand\";\r\nimport { FloatRgba } from \"./FloatRGBA\";\r\nimport { Pass } from \"./RenderFlags\";\r\nimport { Target } from \"./Target\";\r\nimport { MeshData } from \"./MeshData\";\r\n\r\n/** Defines one aspect of the geometry of a mesh (surface or edges)\r\n * @internal\r\n */\r\nexport abstract class MeshGeometry extends LUTGeometry {\r\n public readonly mesh: MeshData;\r\n protected readonly _numIndices: number;\r\n\r\n public override get asMesh() { return this; }\r\n protected override _getLineWeight(params: ShaderProgramParams): number { return this.computeEdgeWeight(params); }\r\n\r\n // Convenience accessors...\r\n public get edgeWidth() { return this.mesh.edgeWidth; }\r\n public get edgeLineCode() { return this.mesh.edgeLineCode; }\r\n public override get hasFeatures() { return this.mesh.hasFeatures; }\r\n public get surfaceType() { return this.mesh.type; }\r\n public get fillFlags() { return this.mesh.fillFlags; }\r\n public get isPlanar() { return this.mesh.isPlanar; }\r\n public get colorInfo(): ColorInfo { return this.mesh.lut.colorInfo; }\r\n public get uniformColor(): FloatRgba | undefined { return this.colorInfo.isUniform ? this.colorInfo.uniform : undefined; }\r\n public get texture() { return this.mesh.texture; }\r\n public get normalMap() { return this.mesh.normalMap; }\r\n public override get hasBakedLighting() { return this.mesh.hasBakedLighting; }\r\n public get lut() { return this.mesh.lut; }\r\n public get hasScalarAnimation() { return this.mesh.lut.hasScalarAnimation; }\r\n\r\n protected constructor(mesh: MeshData, numIndices: number) {\r\n super(mesh.viewIndependentOrigin);\r\n this._numIndices = numIndices;\r\n this.mesh = mesh;\r\n }\r\n\r\n protected computeEdgeWeight(params: ShaderProgramParams): number {\r\n return params.target.computeEdgeWeight(params.renderPass, this.edgeWidth);\r\n }\r\n protected computeEdgeLineCode(params: ShaderProgramParams): number {\r\n return params.target.computeEdgeLineCode(params.renderPass, this.edgeLineCode);\r\n }\r\n protected computeEdgeColor(target: Target): ColorInfo {\r\n return target.computeEdgeColor(this.colorInfo);\r\n }\r\n protected computeEdgePass(target: Target): Pass {\r\n if (target.isDrawingShadowMap)\r\n return \"none\";\r\n\r\n const vf = target.currentViewFlags;\r\n if (RenderMode.SmoothShade === vf.renderMode && !vf.visibleEdges)\r\n return \"none\";\r\n\r\n // Only want translucent edges in wireframe mode.\r\n const isTranslucent = RenderMode.Wireframe === vf.renderMode && vf.transparency && this.colorInfo.hasTranslucency;\r\n return isTranslucent ? \"translucent\" : \"opaque-linear\";\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderFlags.d.ts","sourceRoot":"","sources":["../../../../src/render/webgl/RenderFlags.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH;;;;GAIG;AACH,0BAAkB,UAAU;IAC1B,IAAI,MAAO;IACX,UAAU,IAAI;IACd,YAAY,IAAA;IACZ,YAAY,IAAA;IACZ,YAAY,IAAA;IACZ,aAAa,IAAA;IACb,cAAc,IAAA;IACd,iBAAiB,IAAA;IACjB,WAA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,WAAW;IAErB,IAAqC;IACrC,GAAoC;IACpC,GAAoC;IACpC,KAAsC;IACtC,IAAqC;IACrC,IAAqC;IACrC,GAAoC;IACpC,KAAsC;IAEtC,UAAiB;IACjB,gBAAsB;IACtB,cAAoB;IACpB,QAAc;IAEd,aAAqB;IACrB,iBAAwB;IAExB,SAAgB;IAGhB,aAAmB;IACnB,oBAA0B;IAC1B,0BAAgC;IAGhC,SAAiB;IACjB,eAAuB;IAGvB,YAAkB;IAClB,YAAwB;IACxB,YAAwB;IAGxB,YAA6C;IAC7C,YAA6C;IAC7C,YAA8C;IAE9C,2BAA6D;IAG7D,OAAyC;
|
|
1
|
+
{"version":3,"file":"RenderFlags.d.ts","sourceRoot":"","sources":["../../../../src/render/webgl/RenderFlags.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH;;;;GAIG;AACH,0BAAkB,UAAU;IAC1B,IAAI,MAAO;IACX,UAAU,IAAI;IACd,YAAY,IAAA;IACZ,YAAY,IAAA;IACZ,YAAY,IAAA;IACZ,aAAa,IAAA;IACb,cAAc,IAAA;IACd,iBAAiB,IAAA;IACjB,WAAW,IAAA;IACX,UAAU,IAAA;IACV,MAAM,IAAA;IACN,aAAa,KAAA;IACb,YAAY,KAAA;IACZ,WAAW,KAAA;IACX,MAAM,KAAA;IACN,aAAa,KAAA;IACb,oBAAoB,KAAA;IACpB,qBAAqB,KAAA;IACrB,0BAA0B,KAAA;IAC1B,oBAAoB,KAAA;IACpB,2BAA2B,KAAA;IAC3B,KAAK,KAAA;CACN;AAED;;;;;;;GAOG;AACH,oBAAY,IAAI,GACd,QAAQ,GAAG,SAAS;AACpB,QAAQ,GAAG,gBAAgB;AAC3B,eAAe,GAAG,eAAe;AACjC,eAAe,GAAG,eAAe;AACjC,aAAa,GAAG,cAAc;AAC9B,cAAc,GAAG,cAAc;AAC/B,gBAAgB,GAAG,iBAAiB;AACpC,MAAM,GAAG,OAAO;AAIhB,oBAAoB,GAAG,gCAAgC;AACvD,2BAA2B,C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I;IACd,OAAO,IAAI;IACX,YAAY,IAAI;CACjB;AAED,gBAAgB;AAChB,0BAAkB,aAAa;IAAG,EAAE,IAAA;IAAE,GAAG,IAAA;IAAE,KAAK,IAAA;CAAE"}
|
|
@@ -104,6 +104,8 @@ export var TextureUnit;
|
|
|
104
104
|
TextureUnit[TextureUnit["RealityMeshThematicGradient"] = WebGLRenderingContext.TEXTURE11] = "RealityMeshThematicGradient";
|
|
105
105
|
// Lookup table for indexed edges - used only if WebGL 2 is available.
|
|
106
106
|
TextureUnit[TextureUnit["EdgeLUT"] = WebGLRenderingContext.TEXTURE12] = "EdgeLUT";
|
|
107
|
+
// Normal map texture - used only if WebGL 2 is available.
|
|
108
|
+
TextureUnit[TextureUnit["NormalMap"] = WebGLRenderingContext.TEXTURE13] = "NormalMap";
|
|
107
109
|
})(TextureUnit || (TextureUnit = {}));
|
|
108
110
|
/** @internal */
|
|
109
111
|
export function isPlanar(order) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderFlags.js","sourceRoot":"","sources":["../../../../src/render/webgl/RenderFlags.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,yCAAyC;AAyEzC,gBAAgB;AAChB,MAAM,KAAW,IAAI,CAqDpB;AArDD,WAAiB,IAAI;IACnB,iEAAiE;IACjE,SAAgB,YAAY,CAAC,IAAgB;QAC3C,QAAQ,IAAI,EAAE;YACZ,KAAK,QAAQ,CAAC,CAAC,uBAAyB;YACxC,KAAK,QAAQ,CAAC,CAAC,6BAAgC;YAC/C,KAAK,eAAe,CAAC,CAAC,4BAA+B;YACrD,KAAK,eAAe,CAAC,CAAC,4BAA+B;YACrD,KAAK,aAAa,CAAC,CAAC,2BAA8B;YAClD,KAAK,cAAc,CAAC,CAAC,4BAA8B;YACnD,KAAK,gBAAgB,CAAC,CAAC,8BAAiC;YACxD,KAAK,MAAM,CAAC,CAAC,sBAAuB;SACrC;IACH,CAAC;IAXe,iBAAY,eAW3B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AAA,CAAA;IACrC,iCAAM,qBAAqB,CAAC,QAAQ,SAAA,CAAA;IACpC,mCAAQ,qBAAqB,CAAC,QAAQ,WAAA,CAAA;IAEtC,wCAAa,YAAA,IAAI,gBAAA,CAAA;IACjB,8CAAmB,YAAA,GAAG,sBAAA,CAAA;IACtB,4CAAiB,YAAA,GAAG,oBAAA,CAAA;IACpB,sCAAW,YAAA,GAAG,cAAA,CAAA;IAEd,2CAAgB,YAAA,KAAK,mBAAA,CAAA;IACrB,+CAAoB,YAAA,IAAI,uBAAA,CAAA;IAExB,uCAAY,YAAA,IAAI,eAAA,CAAA;IAEhB,6HAA6H;IAC7H,2CAAgB,YAAA,GAAG,mBAAA,CAAA;IACnB,kDAAuB,YAAA,GAAG,0BAAA,CAAA;IAC1B,wDAA6B,YAAA,GAAG,gCAAA,CAAA;IAEhC,yGAAyG;IACzG,uCAAY,YAAA,KAAK,eAAA,CAAA;IACjB,6CAAkB,YAAA,KAAK,qBAAA,CAAA;IAEvB,8DAA8D;IAC9D,0CAAe,YAAA,GAAG,kBAAA,CAAA;IAClB,0CAAe,YAAA,SAAS,kBAAA,CAAA;IACxB,0CAAe,YAAA,SAAS,kBAAA,CAAA;IAExB,6FAA6F;IAC7F,0CAAe,qBAAqB,CAAC,QAAQ,kBAAA,CAAA;IAC7C,0CAAe,qBAAqB,CAAC,QAAQ,kBAAA,CAAA;IAC7C,0CAAe,qBAAqB,CAAC,SAAS,kBAAA,CAAA;IAE9C,yDAA8B,qBAAqB,CAAC,SAAS,iCAAA,CAAA;IAE7D,sEAAsE;IACtE,qCAAU,qBAAqB,CAAC,SAAS,aAAA,CAAA;AAC3C,CAAC,EA5CW,WAAW,KAAX,WAAW,QA4CtB;AAgCD,gBAAgB;AAChB,MAAM,UAAU,QAAQ,CAAC,KAAkB;IACzC,OAAO,KAAK,qBAAyB,CAAC;AACxC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module WebGL\r\n */\r\n/* eslint-disable no-restricted-syntax */\r\n\r\n/** Ordered list of render passes which produce a rendered frame.\r\n * [[RenderCommands]] organizes its [[DrawCommands]] into a list indexed by RenderPass.\r\n * @see [[Pass]] for the type from which the RenderPass for a [[Primitive]] is derived.\r\n * @internal\r\n */\r\nexport const enum RenderPass {\r\n None = 0xff,\r\n Background = 0,\r\n OpaqueLayers, // XY planar models render without depth-testing in order based on priority\r\n OpaqueLinear, // Linear geometry that is opaque and needs to be written to the pick data buffers\r\n OpaquePlanar, // Planar surface geometry that is opaque and needs to be written to the pick data buffers\r\n OpaqueGeneral, // All other opaque geometry (including point clouds and reality meshes) which are not written to the pick data buffers\r\n Classification, // Stencil volumes for normal processing of reality data classification.\r\n TranslucentLayers, // like Layers but drawn without depth write, blending with opaque\r\n Translucent,\r\n HiddenEdge,\r\n Hilite,\r\n OverlayLayers, // Like Layers, but drawn atop all other geometry\r\n WorldOverlay, // Decorations\r\n ViewOverlay, // Decorations\r\n SkyBox,\r\n BackgroundMap,\r\n HiliteClassification, // Secondary hilite pass for stencil volumes to process hilited classifiers for reality data\r\n ClassificationByIndex, // Stencil volumes for processing classification one classifier at a time (used for generating pick data Ids and flashing a single classifier).\r\n HilitePlanarClassification,\r\n PlanarClassification,\r\n VolumeClassifiedRealityData,\r\n COUNT,\r\n}\r\n\r\n/** Describes the [[RenderPass]]es in which a [[Primitive]] wants to be rendered.\r\n * Generally, each Pass corresponds to a single RenderPass. However a couple of passes specify that the primitive should be rendered\r\n * twice, in two different render passes.\r\n * [[RenderCommands.addPrimitive]] may ignore the requested Pass. For example, edges typically draw in RenderPass.OpaqueLinear, but\r\n * may also draw in RenderPass.HiddenEdge; and translucent geometry may sometimes be rendered in an opaque render pass instead.\r\n * @see [[CachedGeometry.getPass]].\r\n * @internal\r\n */\r\nexport type Pass =\r\n \"skybox\" | // SkyBox\r\n \"opaque\" | // OpaqueGeneral\r\n \"opaque-linear\" | // OpaqueLinear\r\n \"opaque-planar\" | // OpaquePlanar\r\n \"translucent\" | // Translucent\r\n \"view-overlay\" | // ViewOverlay\r\n \"classification\" | // Classification\r\n \"none\" | // None\r\n // The following apply to textured meshes when the texture image contains a mix of opaque and transparent pixels.\r\n // The mesh requests to be rendered in both opaque and transparent passes, with each pass discarding pixels that don't match that pass.\r\n // (i.e., discard transparent pixels during opaque pass and vice-versa).\r\n \"opaque-translucent\" | // OpaqueGeneral and Translucent\r\n \"opaque-planar-translucent\"; // OpaquePlanar and Translucent\r\n\r\n/** [[Pass]]es that map to two [[RenderPass]]es.\r\n * @internal\r\n */\r\nexport type DoublePass = \"opaque-translucent\" | \"opaque-planar-translucent\";\r\n\r\n/** [[Pass]]es that map to a single [[RenderPass]].\r\n * @internal */\r\nexport type SinglePass = Exclude<Pass, DoublePass>;\r\n\r\n/** Describes the type of geometry rendered by a ShaderProgram.\r\n * @internal\r\n */\r\nexport const enum GeometryType {\r\n IndexedTriangles,\r\n IndexedPoints,\r\n ArrayedPoints,\r\n}\r\n\r\n/** @internal */\r\nexport namespace Pass { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** Return the RenderPass corresponding to the specified Pass. */\r\n export function toRenderPass(pass: SinglePass): RenderPass {\r\n switch (pass) {\r\n case \"skybox\": return RenderPass.SkyBox;\r\n case \"opaque\": return RenderPass.OpaqueGeneral;\r\n case \"opaque-linear\": return RenderPass.OpaqueLinear;\r\n case \"opaque-planar\": return RenderPass.OpaquePlanar;\r\n case \"translucent\": return RenderPass.Translucent;\r\n case \"view-overlay\": return RenderPass.ViewOverlay;\r\n case \"classification\": return RenderPass.Classification;\r\n case \"none\": return RenderPass.None;\r\n }\r\n }\r\n\r\n /** Return true if the specified Pass renders during RenderPass.Translucent.\r\n * @note It is possible for both [[rendersTranslucent]] and [[rendersOpaque]] to return true (or false) for a given Pass.\r\n */\r\n export function rendersTranslucent(pass: Pass): boolean {\r\n switch (pass) {\r\n case \"translucent\":\r\n case \"opaque-translucent\":\r\n case \"opaque-planar-translucent\":\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }\r\n\r\n /** Return true if the specified Pass renders during one of the opaque RenderPasses.\r\n * @note It is possible for both [[rendersTranslucent]] and [[rendersOpaque]] to return true for a given Pass.\r\n */\r\n export function rendersOpaque(pass: Pass): boolean {\r\n switch (pass) {\r\n case \"opaque-translucent\":\r\n case \"opaque-planar-translucent\":\r\n case \"opaque\":\r\n case \"opaque-planar\":\r\n case \"opaque-linear\":\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }\r\n\r\n /** Return true if the specified Pass renders both during RenderPass.Translucent and one of the opaque RenderPasses. */\r\n export function rendersOpaqueAndTranslucent(pass: Pass): pass is DoublePass {\r\n return \"opaque-translucent\" === pass || \"opaque-planar-translucent\" === pass;\r\n }\r\n\r\n export function toOpaquePass(pass: DoublePass): RenderPass {\r\n return \"opaque-translucent\" === pass ? RenderPass.OpaqueGeneral : RenderPass.OpaquePlanar;\r\n }\r\n}\r\n\r\n/** Reserved texture units for specific sampler variables, to avoid conflicts between shader components which each have their own textures.\r\n * WebGL 1 guarantees a minimum of 8 vertex texture units, and iOS provides no more than that.\r\n * WebGL 2 guarantees a minimum of 15 vertex texture units.\r\n * @internal\r\n */\r\nexport enum TextureUnit {\r\n // For shaders which know exactly which textures will be used\r\n Zero = WebGLRenderingContext.TEXTURE0,\r\n One = WebGLRenderingContext.TEXTURE1,\r\n Two = WebGLRenderingContext.TEXTURE2,\r\n Three = WebGLRenderingContext.TEXTURE3,\r\n Four = WebGLRenderingContext.TEXTURE4,\r\n Five = WebGLRenderingContext.TEXTURE5,\r\n Six = WebGLRenderingContext.TEXTURE6,\r\n Seven = WebGLRenderingContext.TEXTURE7, // Last one guaranteed available for WebGL 1\r\n\r\n ClipVolume = Zero,\r\n FeatureSymbology = One,\r\n SurfaceTexture = Two,\r\n LineCode = Two,\r\n\r\n PickFeatureId = Three,\r\n PickDepthAndOrder = Four,\r\n\r\n VertexLUT = Five,\r\n\r\n // Texture unit 6 is overloaded. Therefore classification, hilite classification, and aux channel are all mutually exclusive.\r\n AuxChannelLUT = Six,\r\n PlanarClassification = Six,\r\n PlanarClassificationHilite = Six,\r\n\r\n // Texture unit 7 is overloaded. Therefore receiving shadows and thematic display are mutually exclusive.\r\n ShadowMap = Seven,\r\n ThematicSensors = Seven,\r\n\r\n // Textures used for up to 3 background or overlay map layers.\r\n RealityMesh0 = Two,\r\n RealityMesh1 = VertexLUT, // Reality meshes do not use VertexLUT.\r\n RealityMesh2 = ShadowMap, // Shadow map when picking -- PickDepthAndOrder otherwise....\r\n\r\n // If more than 8 texture units are available, 3 additional background or overlay map layers.\r\n RealityMesh3 = WebGLRenderingContext.TEXTURE8,\r\n RealityMesh4 = WebGLRenderingContext.TEXTURE9,\r\n RealityMesh5 = WebGLRenderingContext.TEXTURE10,\r\n\r\n RealityMeshThematicGradient = WebGLRenderingContext.TEXTURE11,\r\n\r\n // Lookup table for indexed edges - used only if WebGL 2 is available.\r\n EdgeLUT = WebGLRenderingContext.TEXTURE12,\r\n}\r\n\r\n/**\r\n * Defines the order in which primitives are rendered within a GLESList. This is chiefly\r\n * used to sort primitives which originate from the same element. e.g., the blanking fill\r\n * associated with a text field must always render behind the text; the edges of a surface\r\n * must render in front of the surface; etc.\r\n * An exception to the 'same element' rule is provided for planar surfaces and edges thereof\r\n * sketched onto non-planar surfaces. When the depth test is ambiguous the planar geometry\r\n * is always on top of the non-planar surface. This addresses z-fighting when shapes are\r\n * sketched onto surfaces, e.g. as part of push-pull modeling workflows.\r\n * @internal\r\n */\r\nexport const enum RenderOrder {\r\n None = 0,\r\n Background = 1, // i.e., background map drawn without depth\r\n BlankingRegion = 2,\r\n UnlitSurface = 3, // Distinction only made for whether or not to apply ambient occlusion.\r\n LitSurface = 4,\r\n Linear = 5,\r\n Edge = 6,\r\n Silhouette = 7,\r\n\r\n PlanarBit = 8,\r\n\r\n PlanarUnlitSurface = UnlitSurface | PlanarBit,\r\n PlanarLitSurface = LitSurface | PlanarBit,\r\n PlanarLinear = Linear | PlanarBit,\r\n PlanarEdge = Edge | PlanarBit,\r\n PlanarSilhouette = Silhouette | PlanarBit,\r\n}\r\n\r\n/** @internal */\r\nexport function isPlanar(order: RenderOrder): boolean {\r\n return order >= RenderOrder.PlanarBit;\r\n}\r\n\r\n/** Flags indicating operations to be performed by the post-process composite step.\r\n * @internal\r\n */\r\nexport const enum CompositeFlags {\r\n None = 0,\r\n Translucent = 1 << 0,\r\n Hilite = 1 << 1,\r\n AmbientOcclusion = 1 << 2,\r\n}\r\n\r\n/** Location in boolean array of SurfaceFlags above.\r\n * @internal\r\n */\r\nexport const enum SurfaceBitIndex {\r\n HasTexture,\r\n ApplyLighting,\r\n HasNormals,\r\n IgnoreMaterial,\r\n TransparencyThreshold,\r\n BackgroundFill,\r\n HasColorAndNormal,\r\n OverrideRgb,\r\n HasNormalMap,\r\n HasMaterialAtlas,\r\n Count,\r\n}\r\n\r\n/** Describes attributes of a MeshGeometry object. Used to conditionally execute portion of shader programs.\r\n * @internal\r\n */\r\nexport const enum SurfaceFlags {\r\n None = 0,\r\n HasTexture = 1 << SurfaceBitIndex.HasTexture,\r\n ApplyLighting = 1 << SurfaceBitIndex.ApplyLighting,\r\n HasNormals = 1 << SurfaceBitIndex.HasNormals,\r\n\r\n // NB: In u_surfaceFlags provided to shader, indicates material color/specular/alpha should be ignored. Has no effect on texture.\r\n // If a given feature has the 'ignore material' override set, v_surfaceFlags will be modified to turn on IgnoreMaterial and turn off HasTexture.\r\n IgnoreMaterial = 1 << SurfaceBitIndex.IgnoreMaterial,\r\n\r\n // In HiddenLine and SolidFill modes, a transparency threshold is supplied; surfaces that are more transparent than the threshold are not rendered.\r\n TransparencyThreshold = 1 << SurfaceBitIndex.TransparencyThreshold,\r\n\r\n // For HiddenLine mode\r\n BackgroundFill = 1 << SurfaceBitIndex.BackgroundFill,\r\n\r\n // For textured meshes, the color index in the vertex LUT is unused - we place the normal there instead.\r\n // For untextured lit meshes, the normal is placed after the feature ID.\r\n HasColorAndNormal = 1 << SurfaceBitIndex.HasColorAndNormal,\r\n // For textured meshes, use rgb from v_color instead of from texture.\r\n OverrideRgb = 1 << SurfaceBitIndex.OverrideRgb,\r\n // For geometry with fixed normals (terrain meshes) we must avoid front facing normal reversal or skirts will be incorrectly lit.\r\n HasNormalMap = 1 << SurfaceBitIndex.HasNormalMap,\r\n HasMaterialAtlas = 1 << SurfaceBitIndex.HasMaterialAtlas,\r\n}\r\n\r\n/** 16-bit flags indicating what aspects of a feature's symbology are overridden.\r\n * @internal\r\n */\r\nexport const enum OvrFlags {\r\n None = 0,\r\n Visibility = 1 << 0,\r\n Rgb = 1 << 1,\r\n Alpha = 1 << 2,\r\n IgnoreMaterial = 1 << 3, // ignore material color, specular properties, and texture.\r\n Flashed = 1 << 4,\r\n NonLocatable = 1 << 5, // do not draw during pick - allows geometry beneath to be picked.\r\n LineCode = 1 << 6,\r\n Weight = 1 << 7,\r\n Hilited = 1 << 8,\r\n Emphasized = 1 << 9, // rendered with \"emphasis\" hilite settings (silhouette etc).\r\n ViewIndependentTransparency = 1 << 10,\r\n\r\n Rgba = Rgb | Alpha,\r\n}\r\n\r\n/** 8-bit flags indicating emphasis effects applied to a feature.\r\n * @internal\r\n */\r\nexport const enum EmphasisFlags {\r\n None = 0,\r\n Hilite = 1,\r\n Emphasized = 2,\r\n Flashed = 4,\r\n NonLocatable = 8,\r\n}\r\n\r\n/** @internal */\r\nexport const enum IsTranslucent { No, Yes, Maybe }\r\n"]}
|
|
1
|
+
{"version":3,"file":"RenderFlags.js","sourceRoot":"","sources":["../../../../src/render/webgl/RenderFlags.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,yCAAyC;AAyEzC,gBAAgB;AAChB,MAAM,KAAW,IAAI,CAqDpB;AArDD,WAAiB,IAAI;IACnB,iEAAiE;IACjE,SAAgB,YAAY,CAAC,IA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AA;IAC7C,0CAAe,qBAAqB,CAAC,SAAS,kBAAA,CAAA;IAE9C,yDAA8B,qBAAqB,CAAC,SAAS,iCAAA,CAAA;IAE7D,sEAAsE;IACtE,qCAAU,qBAAqB,CAAC,SAAS,aAAA,CAAA;IAEzC,0DAA0D;IAC1D,uCAAY,qBAAqB,CAAC,SAAS,eAAA,CAAA;AAC7C,CAAC,EA/CW,WAAW,KAAX,WAAW,QA+CtB;AAgCD,gBAAgB;AAChB,MAAM,UAAU,QAAQ,CAAC,KAAkB;IACzC,OAAO,KAAK,qBAAyB,CAAC;AACxC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module WebGL\r\n */\r\n/* eslint-disable no-restricted-syntax */\r\n\r\n/** Ordered list of render passes which produce a rendered frame.\r\n * [[RenderCommands]] organizes its [[DrawCommands]] into a list indexed by RenderPass.\r\n * @see [[Pass]] for the type from which the RenderPass for a [[Primitive]] is derived.\r\n * @internal\r\n */\r\nexport const enum RenderPass {\r\n None = 0xff,\r\n Background = 0,\r\n OpaqueLayers, // XY planar models render without depth-testing in order based on priority\r\n OpaqueLinear, // Linear geometry that is opaque and needs to be written to the pick data buffers\r\n OpaquePlanar, // Planar surface geometry that is opaque and needs to be written to the pick data buffers\r\n OpaqueGeneral, // All other opaque geometry (including point clouds and reality meshes) which are not written to the pick data buffers\r\n Classification, // Stencil volumes for normal processing of reality data classification.\r\n TranslucentLayers, // like Layers but drawn without depth write, blending with opaque\r\n Translucent,\r\n HiddenEdge,\r\n Hilite,\r\n OverlayLayers, // Like Layers, but drawn atop all other geometry\r\n WorldOverlay, // Decorations\r\n ViewOverlay, // Decorations\r\n SkyBox,\r\n BackgroundMap,\r\n HiliteClassification, // Secondary hilite pass for stencil volumes to process hilited classifiers for reality data\r\n ClassificationByIndex, // Stencil volumes for processing classification one classifier at a time (used for generating pick data Ids and flashing a single classifier).\r\n HilitePlanarClassification,\r\n PlanarClassification,\r\n VolumeClassifiedRealityData,\r\n COUNT,\r\n}\r\n\r\n/** Describes the [[RenderPass]]es in which a [[Primitive]] wants to be rendered.\r\n * Generally, each Pass corresponds to a single RenderPass. However a couple of passes specify that the primitive should be rendered\r\n * twice, in two different render passes.\r\n * [[RenderCommands.addPrimitive]] may ignore the requested Pass. For example, edges typically draw in RenderPass.OpaqueLinear, but\r\n * may also draw in RenderPass.HiddenEdge; and translucent geometry may sometimes be rendered in an opaque render pass instead.\r\n * @see [[CachedGeometry.getPass]].\r\n * @internal\r\n */\r\nexport type Pass =\r\n \"skybox\" | // SkyBox\r\n \"opaque\" | // OpaqueGeneral\r\n \"opaque-linear\" | // OpaqueLinear\r\n \"opaque-planar\" | // OpaquePlanar\r\n \"translucent\" | // Translucent\r\n \"view-overlay\" | // ViewOverlay\r\n \"classification\" | // Classification\r\n \"none\" | // None\r\n // The following apply to textured meshes when the texture image contains a mix of opaque and transparent pixels.\r\n // The mesh requests to be rendered in both opaque and transparent passes, with each pass discarding pixels that don't match that pass.\r\n // (i.e., discard transparent pixels during opaque pass and vice-versa).\r\n \"opaque-translucent\" | // OpaqueGeneral and Translucent\r\n \"opaque-planar-translucent\"; // OpaquePlanar and Translucent\r\n\r\n/** [[Pass]]es that map to two [[RenderPass]]es.\r\n * @internal\r\n */\r\nexport type DoublePass = \"opaque-translucent\" | \"opaque-planar-translucent\";\r\n\r\n/** [[Pass]]es that map to a single [[RenderPass]].\r\n * @internal */\r\nexport type SinglePass = Exclude<Pass, DoublePass>;\r\n\r\n/** Describes the type of geometry rendered by a ShaderProgram.\r\n * @internal\r\n */\r\nexport const enum GeometryType {\r\n IndexedTriangles,\r\n IndexedPoints,\r\n ArrayedPoints,\r\n}\r\n\r\n/** @internal */\r\nexport namespace Pass { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** Return the RenderPass corresponding to the specified Pass. */\r\n export function toRenderPass(pass: SinglePass): RenderPass {\r\n switch (pass) {\r\n case \"skybox\": return RenderPass.SkyBox;\r\n case \"opaque\": return RenderPass.OpaqueGeneral;\r\n case \"opaque-linear\": return RenderPass.OpaqueLinear;\r\n case \"opaque-planar\": return RenderPass.OpaquePlanar;\r\n case \"translucent\": return RenderPass.Translucent;\r\n case \"view-overlay\": return RenderPass.ViewOverlay;\r\n case \"classification\": return RenderPass.Classification;\r\n case \"none\": return RenderPass.None;\r\n }\r\n }\r\n\r\n /** Return true if the specified Pass renders during RenderPass.Translucent.\r\n * @note It is possible for both [[rendersTranslucent]] and [[rendersOpaque]] to return true (or false) for a given Pass.\r\n */\r\n export function rendersTranslucent(pass: Pass): boolean {\r\n switch (pass) {\r\n case \"translucent\":\r\n case \"opaque-translucent\":\r\n case \"opaque-planar-translucent\":\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }\r\n\r\n /** Return true if the specified Pass renders during one of the opaque RenderPasses.\r\n * @note It is possible for both [[rendersTranslucent]] and [[rendersOpaque]] to return true for a given Pass.\r\n */\r\n export function rendersOpaque(pass: Pass): boolean {\r\n switch (pass) {\r\n case \"opaque-translucent\":\r\n case \"opaque-planar-translucent\":\r\n case \"opaque\":\r\n case \"opaque-planar\":\r\n case \"opaque-linear\":\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }\r\n\r\n /** Return true if the specified Pass renders both during RenderPass.Translucent and one of the opaque RenderPasses. */\r\n export function rendersOpaqueAndTranslucent(pass: Pass): pass is DoublePass {\r\n return \"opaque-translucent\" === pass || \"opaque-planar-translucent\" === pass;\r\n }\r\n\r\n export function toOpaquePass(pass: DoublePass): RenderPass {\r\n return \"opaque-translucent\" === pass ? RenderPass.OpaqueGeneral : RenderPass.OpaquePlanar;\r\n }\r\n}\r\n\r\n/** Reserved texture units for specific sampler variables, to avoid conflicts between shader components which each have their own textures.\r\n * WebGL 1 guarantees a minimum of 8 vertex texture units, and iOS provides no more than that.\r\n * WebGL 2 guarantees a minimum of 15 vertex texture units.\r\n * @internal\r\n */\r\nexport enum TextureUnit {\r\n // For shaders which know exactly which textures will be used\r\n Zero = WebGLRenderingContext.TEXTURE0,\r\n One = WebGLRenderingContext.TEXTURE1,\r\n Two = WebGLRenderingContext.TEXTURE2,\r\n Three = WebGLRenderingContext.TEXTURE3,\r\n Four = WebGLRenderingContext.TEXTURE4,\r\n Five = WebGLRenderingContext.TEXTURE5,\r\n Six = WebGLRenderingContext.TEXTURE6,\r\n Seven = WebGLRenderingContext.TEXTURE7, // Last one guaranteed available for WebGL 1\r\n\r\n ClipVolume = Zero,\r\n FeatureSymbology = One,\r\n SurfaceTexture = Two,\r\n LineCode = Two,\r\n\r\n PickFeatureId = Three,\r\n PickDepthAndOrder = Four,\r\n\r\n VertexLUT = Five,\r\n\r\n // Texture unit 6 is overloaded. Therefore classification, hilite classification, and aux channel are all mutually exclusive.\r\n AuxChannelLUT = Six,\r\n PlanarClassification = Six,\r\n PlanarClassificationHilite = Six,\r\n\r\n // Texture unit 7 is overloaded. Therefore receiving shadows and thematic display are mutually exclusive.\r\n ShadowMap = Seven,\r\n ThematicSensors = Seven,\r\n\r\n // Textures used for up to 3 background or overlay map layers.\r\n RealityMesh0 = Two,\r\n RealityMesh1 = VertexLUT, // Reality meshes do not use VertexLUT.\r\n RealityMesh2 = ShadowMap, // Shadow map when picking -- PickDepthAndOrder otherwise....\r\n\r\n // If more than 8 texture units are available, 3 additional background or overlay map layers.\r\n RealityMesh3 = WebGLRenderingContext.TEXTURE8,\r\n RealityMesh4 = WebGLRenderingContext.TEXTURE9,\r\n RealityMesh5 = WebGLRenderingContext.TEXTURE10,\r\n\r\n RealityMeshThematicGradient = WebGLRenderingContext.TEXTURE11,\r\n\r\n // Lookup table for indexed edges - used only if WebGL 2 is available.\r\n EdgeLUT = WebGLRenderingContext.TEXTURE12,\r\n\r\n // Normal map texture - used only if WebGL 2 is available.\r\n NormalMap = WebGLRenderingContext.TEXTURE13,\r\n}\r\n\r\n/**\r\n * Defines the order in which primitives are rendered within a GLESList. This is chiefly\r\n * used to sort primitives which originate from the same element. e.g., the blanking fill\r\n * associated with a text field must always render behind the text; the edges of a surface\r\n * must render in front of the surface; etc.\r\n * An exception to the 'same element' rule is provided for planar surfaces and edges thereof\r\n * sketched onto non-planar surfaces. When the depth test is ambiguous the planar geometry\r\n * is always on top of the non-planar surface. This addresses z-fighting when shapes are\r\n * sketched onto surfaces, e.g. as part of push-pull modeling workflows.\r\n * @internal\r\n */\r\nexport const enum RenderOrder {\r\n None = 0,\r\n Background = 1, // i.e., background map drawn without depth\r\n BlankingRegion = 2,\r\n UnlitSurface = 3, // Distinction only made for whether or not to apply ambient occlusion.\r\n LitSurface = 4,\r\n Linear = 5,\r\n Edge = 6,\r\n Silhouette = 7,\r\n\r\n PlanarBit = 8,\r\n\r\n PlanarUnlitSurface = UnlitSurface | PlanarBit,\r\n PlanarLitSurface = LitSurface | PlanarBit,\r\n PlanarLinear = Linear | PlanarBit,\r\n PlanarEdge = Edge | PlanarBit,\r\n PlanarSilhouette = Silhouette | PlanarBit,\r\n}\r\n\r\n/** @internal */\r\nexport function isPlanar(order: RenderOrder): boolean {\r\n return order >= RenderOrder.PlanarBit;\r\n}\r\n\r\n/** Flags indicating operations to be performed by the post-process composite step.\r\n * @internal\r\n */\r\nexport const enum CompositeFlags {\r\n None = 0,\r\n Translucent = 1 << 0,\r\n Hilite = 1 << 1,\r\n AmbientOcclusion = 1 << 2,\r\n}\r\n\r\n/** Location in boolean array of SurfaceFlags above.\r\n * @internal\r\n */\r\nexport const enum SurfaceBitIndex {\r\n HasTexture,\r\n ApplyLighting,\r\n HasNormals,\r\n IgnoreMaterial,\r\n TransparencyThreshold,\r\n BackgroundFill,\r\n HasColorAndNormal,\r\n OverrideRgb,\r\n HasNormalMap,\r\n HasMaterialAtlas,\r\n Count,\r\n}\r\n\r\n/** Describes attributes of a MeshGeometry object. Used to conditionally execute portion of shader programs.\r\n * @internal\r\n */\r\nexport const enum SurfaceFlags {\r\n None = 0,\r\n HasTexture = 1 << SurfaceBitIndex.HasTexture,\r\n ApplyLighting = 1 << SurfaceBitIndex.ApplyLighting,\r\n HasNormals = 1 << SurfaceBitIndex.HasNormals,\r\n\r\n // NB: In u_surfaceFlags provided to shader, indicates material color/specular/alpha should be ignored. Has no effect on texture.\r\n // If a given feature has the 'ignore material' override set, v_surfaceFlags will be modified to turn on IgnoreMaterial and turn off HasTexture.\r\n IgnoreMaterial = 1 << SurfaceBitIndex.IgnoreMaterial,\r\n\r\n // In HiddenLine and SolidFill modes, a transparency threshold is supplied; surfaces that are more transparent than the threshold are not rendered.\r\n TransparencyThreshold = 1 << SurfaceBitIndex.TransparencyThreshold,\r\n\r\n // For HiddenLine mode\r\n BackgroundFill = 1 << SurfaceBitIndex.BackgroundFill,\r\n\r\n // For textured meshes, the color index in the vertex LUT is unused - we place the normal there instead.\r\n // For untextured lit meshes, the normal is placed after the feature ID.\r\n HasColorAndNormal = 1 << SurfaceBitIndex.HasColorAndNormal,\r\n // For textured meshes, use rgb from v_color instead of from texture.\r\n OverrideRgb = 1 << SurfaceBitIndex.OverrideRgb,\r\n // For geometry with fixed normals (terrain meshes) we must avoid front facing normal reversal or skirts will be incorrectly lit.\r\n HasNormalMap = 1 << SurfaceBitIndex.HasNormalMap,\r\n HasMaterialAtlas = 1 << SurfaceBitIndex.HasMaterialAtlas,\r\n}\r\n\r\n/** 16-bit flags indicating what aspects of a feature's symbology are overridden.\r\n * @internal\r\n */\r\nexport const enum OvrFlags {\r\n None = 0,\r\n Visibility = 1 << 0,\r\n Rgb = 1 << 1,\r\n Alpha = 1 << 2,\r\n IgnoreMaterial = 1 << 3, // ignore material color, specular properties, and texture.\r\n Flashed = 1 << 4,\r\n NonLocatable = 1 << 5, // do not draw during pick - allows geometry beneath to be picked.\r\n LineCode = 1 << 6,\r\n Weight = 1 << 7,\r\n Hilited = 1 << 8,\r\n Emphasized = 1 << 9, // rendered with \"emphasis\" hilite settings (silhouette etc).\r\n ViewIndependentTransparency = 1 << 10,\r\n\r\n Rgba = Rgb | Alpha,\r\n}\r\n\r\n/** 8-bit flags indicating emphasis effects applied to a feature.\r\n * @internal\r\n */\r\nexport const enum EmphasisFlags {\r\n None = 0,\r\n Hilite = 1,\r\n Emphasized = 2,\r\n Flashed = 4,\r\n NonLocatable = 8,\r\n}\r\n\r\n/** @internal */\r\nexport const enum IsTranslucent { No, Yes, Maybe }\r\n"]}
|
|
@@ -227,7 +227,8 @@ export declare const enum FragmentShaderComponent {
|
|
|
227
227
|
FinalizeDepth = 18,
|
|
228
228
|
OverrideColor = 19,
|
|
229
229
|
OverrideRenderOrder = 20,
|
|
230
|
-
|
|
230
|
+
FinalizeNormal = 21,
|
|
231
|
+
COUNT = 22
|
|
231
232
|
}
|
|
232
233
|
/** Assembles the source code for a fragment shader from a set of modular components.
|
|
233
234
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShaderBuilder.d.ts","sourceRoot":"","sources":["../../../../src/render/webgl/ShaderBuilder.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIlD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIhD;;GAEG;AACH,0BAAkB,YAAY;IAC5B,OAAO,IAAA;IACP,GAAG,IAAA;IACH,KAAK,IAAA;IACL,IAAI,IAAA;IACJ,IAAI,IAAA;IACJ,IAAI,IAAA;IACJ,IAAI,IAAA;IACJ,IAAI,IAAA;IACJ,SAAS,IAAA;IACT,WAAW,IAAA;IACX,IAAI,KAAA;IAEJ,KAAK,KAAA;CACN;AAED;;GAEG;AACH,0BAAkB,aAAa;IAC7B,MAAM,IAAA;IACN,OAAO,IAAA;IACP,OAAO,IAAA;IAEP,KAAK,IAAA;C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AE,kBAAkB,EAAE,KAAK,GAAE,UAA4B;IAG7G,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,KAAK,GAAE,UAA4B;IAGlI,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;IAG3C,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,GAAE,UAA4B,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,OAAe;IAIzH,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM;IAIpF,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAO/F,kCAAkC,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAM7G,kGAAkG;IAC3F,YAAY,CAAC,EAAE,EAAE,YAAY,GAAG,aAAa;IAmC7C,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAKrD,mDAAmD;IAC5C,KAAK,IAAI,cAAc;CAM/B"}
|
|
@@ -651,7 +651,7 @@ export class VertexShaderBuilder extends ShaderBuilder {
|
|
|
651
651
|
*/
|
|
652
652
|
export class FragmentShaderBuilder extends ShaderBuilder {
|
|
653
653
|
constructor(flags = {}) {
|
|
654
|
-
super(
|
|
654
|
+
super(22 /* COUNT */, flags);
|
|
655
655
|
this.requiresEarlyZWorkaround = false;
|
|
656
656
|
if (System.instance.capabilities.isWebGL2)
|
|
657
657
|
this.addFragOutput("FragColor", -1);
|
|
@@ -697,6 +697,11 @@ export class FragmentShaderBuilder extends ShaderBuilder {
|
|
|
697
697
|
prelude.addFunction("bool checkForEarlyDiscard()", checkForEarlyDiscard);
|
|
698
698
|
main.addline(" if (checkForEarlyDiscard()) { discard; return; }");
|
|
699
699
|
}
|
|
700
|
+
const finalizeNormal = this.get(21 /* FinalizeNormal */);
|
|
701
|
+
if (undefined !== finalizeNormal) {
|
|
702
|
+
prelude.addFunction("vec3 finalizeNormal()", finalizeNormal);
|
|
703
|
+
main.addline(" g_normal = finalizeNormal();");
|
|
704
|
+
}
|
|
700
705
|
main.addline(" vec4 baseColor = computeBaseColor();");
|
|
701
706
|
const finalizeDepth = this.get(18 /* FinalizeDepth */);
|
|
702
707
|
if (undefined !== finalizeDepth) {
|