UNPKG

@itwin/core-frontend

Version:
214 lines • 7.72 kB
/** @packageDocumentation * @module WebGL */ /** Ordered list of render passes which produce a rendered frame. * [[RenderCommands]] organizes its [[DrawCommands]] into a list indexed by RenderPass. * @see [[Pass]] for the type from which the RenderPass for a [[Primitive]] is derived. * @internal */ export declare const enum RenderPass { None = 255, Background = 0, OpaqueLayers = 1,// XY planar models render without depth-testing in order based on priority OpaqueLinear = 2,// Linear geometry that is opaque and needs to be written to the pick data buffers OpaquePlanar = 3,// Planar surface geometry that is opaque and needs to be written to the pick data buffers PointClouds = 4, OpaqueGeneral = 5,// All other opaque geometry (including point clouds and reality meshes) which are not written to the pick data buffers Classification = 6,// Stencil volumes for normal processing of reality data classification. TranslucentLayers = 7,// like Layers but drawn without depth write, blending with opaque Translucent = 8, HiddenEdge = 9, Hilite = 10, OverlayLayers = 11,// Like Layers, but drawn atop all other geometry WorldOverlay = 12,// Decorations ViewOverlay = 13,// Decorations SkyBox = 14, BackgroundMap = 15, HiliteClassification = 16,// Secondary hilite pass for stencil volumes to process hilited classifiers for reality data ClassificationByIndex = 17,// Stencil volumes for processing classification one classifier at a time (used for generating pick data Ids and flashing a single classifier). HilitePlanarClassification = 18, PlanarClassification = 19, VolumeClassifiedRealityData = 20, COUNT = 21 } /** Describes the [[RenderPass]]es in which a [[Primitive]] wants to be rendered. * Generally, each Pass corresponds to a single RenderPass. However a couple of passes specify that the primitive should be rendered * twice, in two different render passes. * [[RenderCommands.addPrimitive]] may ignore the requested Pass. For example, edges typically draw in RenderPass.OpaqueLinear, but * may also draw in RenderPass.HiddenEdge; and translucent geometry may sometimes be rendered in an opaque render pass instead. * @see [[CachedGeometry.getPass]]. * @internal */ export type Pass = "skybox" | // SkyBox "opaque" | // OpaqueGeneral "opaque-linear" | // OpaqueLinear "opaque-planar" | // OpaquePlanar "translucent" | // Translucent "point-clouds" | // PointClouds "view-overlay" | // ViewOverlay "classification" | // Classification "none" | // None "opaque-translucent" | // OpaqueGeneral and Translucent "opaque-planar-translucent"; /** [[Pass]]es that map to two [[RenderPass]]es. * @internal */ export type DoublePass = "opaque-translucent" | "opaque-planar-translucent"; /** [[Pass]]es that map to a single [[RenderPass]]. * @internal */ export type SinglePass = Exclude<Pass, DoublePass>; /** Describes the type of geometry rendered by a ShaderProgram. * @internal */ export declare const enum GeometryType { IndexedTriangles = 0, IndexedPoints = 1, ArrayedPoints = 2 } /** @internal */ export declare namespace Pass { /** Return the RenderPass corresponding to the specified Pass. */ function toRenderPass(pass: SinglePass): RenderPass; /** Return true if the specified Pass renders during RenderPass.Translucent. * @note It is possible for both [[rendersTranslucent]] and [[rendersOpaque]] to return true (or false) for a given Pass. */ function rendersTranslucent(pass: Pass): boolean; /** Return true if the specified Pass renders during one of the opaque RenderPasses. * @note It is possible for both [[rendersTranslucent]] and [[rendersOpaque]] to return true for a given Pass. */ function rendersOpaque(pass: Pass): boolean; /** Return true if the specified Pass renders both during RenderPass.Translucent and one of the opaque RenderPasses. */ function rendersOpaqueAndTranslucent(pass: Pass): pass is DoublePass; function toOpaquePass(pass: DoublePass): RenderPass; } /** Reserved texture units for specific sampler variables, to avoid conflicts between shader components which each have their own textures. * WebGL 2 guarantees a minimum of 16 vertex texture units. * @internal */ export declare enum TextureUnit { Zero, One, Two, Three, Four, Five, Six, Seven, ClipVolume, FeatureSymbology, SurfaceTexture, LineCode, PickFeatureId, PickDepthAndOrder, VertexLUT, AuxChannelLUT, PlanarClassification, PlanarClassificationHilite, ShadowMap, ThematicSensors, RealityMesh0, RealityMesh1,// Reality meshes do not use VertexLUT. RealityMesh2,// Shadow map when picking -- PickDepthAndOrder otherwise.... RealityMesh3, RealityMesh4, RealityMesh5, RealityMeshThematicGradient, EdgeLUT, NormalMap, Contours, SurfaceDraping0, SurfaceDraping1, SurfaceDraping2, SurfaceDraping3, SurfaceDraping4, SurfaceDraping5 } /** * Defines the order in which primitives are rendered within a GLESList. This is chiefly * used to sort primitives which originate from the same element. e.g., the blanking fill * associated with a text field must always render behind the text; the edges of a surface * must render in front of the surface; etc. * An exception to the 'same element' rule is provided for planar surfaces and edges thereof * sketched onto non-planar surfaces. When the depth test is ambiguous the planar geometry * is always on top of the non-planar surface. This addresses z-fighting when shapes are * sketched onto surfaces, e.g. as part of push-pull modeling workflows. * @internal */ export declare const enum RenderOrder { None = 0, Background = 1,// i.e., background map drawn without depth BlankingRegion = 2, UnlitSurface = 3,// Distinction only made for whether or not to apply ambient occlusion. LitSurface = 4, Linear = 5, Edge = 6, Silhouette = 7, PlanarBit = 8, PlanarUnlitSurface = 11, PlanarLitSurface = 12, PlanarLinear = 13, PlanarEdge = 14, PlanarSilhouette = 15 } /** @internal */ export declare function isPlanar(order: RenderOrder): boolean; /** Flags indicating operations to be performed by the post-process composite step. * @internal */ export declare const enum CompositeFlags { None = 0, Translucent = 1, Hilite = 2, AmbientOcclusion = 4 } /** Location in boolean array of SurfaceFlags above. * @internal */ export declare const enum SurfaceBitIndex { HasTexture = 0, ApplyLighting = 1, HasNormals = 2, IgnoreMaterial = 3, TransparencyThreshold = 4, BackgroundFill = 5, HasColorAndNormal = 6, OverrideRgb = 7, HasNormalMap = 8, HasMaterialAtlas = 9, UseConstantLodTextureMapping = 10, UseConstantLodNormalMapMapping = 11, Count = 12 } /** Describes attributes of a MeshGeometry object. Used to conditionally execute portion of shader programs. * @internal */ export declare const enum SurfaceFlags { None = 0, HasTexture = 1, ApplyLighting = 2, HasNormals = 4, IgnoreMaterial = 8, TransparencyThreshold = 16, BackgroundFill = 32, HasColorAndNormal = 64, OverrideRgb = 128, HasNormalMap = 256, HasMaterialAtlas = 512 } /** 8-bit flags indicating emphasis effects applied to a feature. * @internal */ export declare const enum EmphasisFlags { None = 0, Hilite = 1, Emphasized = 2, Flashed = 4, NonLocatable = 8 } /** @internal */ export declare const enum IsTranslucent { No = 0, Yes = 1, Maybe = 2 } //# sourceMappingURL=RenderFlags.d.ts.map