babylon.quarks - v1.0.0
    Preparing search index...

    Interface VFXBatchSettings

    Everything about a system that decides how it is drawn: ParticleSystem.getRendererSettings returns it, and the renderer draws systems whose settings match from one batch. Only the settings a render mode reads count: two billboards that differ in a mesh-only setting, such as rim, share a batch.

    A batch is one draw with one material, so its settings fall into two groups, as a Unity material's keywords and texture slots against its MaterialPropertyBlock values, or an Unreal material against a dynamic material instance's parameters. The shader key (render mode, geometry, textures, blend and depth state, and which effects are on) decides the material. The live parameters (the fade distances, alpha cutoff, pivot, size limits, reflection level, rim colour, each effect's numbers, and each texture's tiling, offset and scroll) are uniforms: changing one on a system that is alone in its batch writes the material in place, with no new batch or material. A texture's UV channel is part of the shader key, so changing it rebuilds.

    Prefer the system's own setters, which also move it to a matching batch; after changing a field directly, set ParticleSystem.neededToUpdateRender.

    interface VFXBatchSettings {
        applyFog: boolean;
        applyImageProcessing?: boolean;
        blendTiles: boolean;
        erosion?: ParticleErosion;
        gradientMap?: ParticleGradientMap;
        instancingColors?: Float32Array<ArrayBufferLike>;
        instancingGeometry: Float32Array;
        instancingIndices:
            | Uint32Array<ArrayBufferLike>
            | Uint16Array<ArrayBufferLike>;
        instancingNormals?: Float32Array<ArrayBufferLike>;
        instancingUVs?: Float32Array<ArrayBufferLike>;
        instancingUVs2?: Float32Array<ArrayBufferLike>;
        layerMask: number;
        lighting?: MeshLighting;
        mapUV?: TextureUV;
        materialAlphaTest: number;
        materialBlendMode: number;
        materialColor?: readonly [number, number, number, number];
        materialColorScale?: number;
        materialDepthTest: boolean;
        materialDepthWrite: boolean;
        materialTransparent: boolean;
        maxParticleSize?: number;
        minParticleSize?: number;
        particleColor?: boolean;
        pivot?: Vector3Like;
        premultipliedMap?: boolean;
        reflectionAtlas: BaseTexture | null;
        reflectionLevel: number;
        reflectionTexture: BaseTexture | null;
        renderAlignment?: RenderAlignment;
        renderFace?: RenderFace;
        renderingGroupId: number;
        renderMode: RenderMode;
        renderOrder: number;
        rim?: MeshRim;
        softFarFade: number;
        softNearFade: number;
        softParticles: boolean;
        sortingFudge?: number;
        sortMode?: SortMode;
        texture: Texture | null;
        uTileCount: number;
        uvDistortion?: ParticleUVDistortion;
        vTileCount: number;
    }
    Index
    applyFog: boolean

    Whether the scene's fog applies to the particles, as it does to any other mesh; true by default. Particles that lay over the frame (ALPHA_COMBINE, ALPHA_PREMULTIPLIED, opaque ones) mix toward the fog colour; particles that add to it or subtract from it (ALPHA_ADD, ALPHA_ONEONE, ALPHA_SCREENMODE, ALPHA_SUBTRACT, …) fade toward black, since the fog colour would fog the whole screen; particles that multiply it (ALPHA_MULTIPLY) fade toward white. See blendCategory. Systems that differ are batched apart.

    applyImageProcessing?: boolean

    Whether the material applies the scene's image processing (scene.imageProcessingConfiguration: exposure, contrast, tone mapping, vignette, colour curves, colour grading, dithering), as Babylon's own ParticleSystem and its standard and PBR materials do; unset reads as true. When the configuration is applied by a post process (a DefaultRenderingPipeline with image processing on), the material leaves its colour in linear space for it, as those materials do. Off, the material does neither: its colour is written as authored. That does not keep the particles out of a post process, which processes the whole frame; particles that must reach the screen untouched are drawn by a camera the pipeline is not attached to. Systems that differ are batched apart. See ParticleSystem.applyImageProcessing.

    blendTiles: boolean

    See ParticleSystem.blendTiles; read with a sheet, and not by trails.

    erosion?: ParticleErosion

    Alpha erosion (dissolve / wipe), see ParticleErosion. Unset: none. Systems that differ are batched apart.

    gradientMap?: ParticleGradientMap

    Colour ramp the map is recoloured through, see ParticleGradientMap. Unset: none. Systems that differ are batched apart.

    instancingColors?: Float32Array<ArrayBufferLike>

    The mesh's vertex colours, see ParticleSystem.instancingColors.

    instancingGeometry: Float32Array

    Mesh particles' vertex positions, see ParticleSystem.instancingGeometry. A quad for other modes.

    instancingIndices: Uint32Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike>

    Triangle indices into instancingGeometry.

    instancingNormals?: Float32Array<ArrayBufferLike>

    The mesh's vertex normals; mesh particles fall back to +Z.

    instancingUVs?: Float32Array<ArrayBufferLike>

    The mesh's first UV set, two values per vertex.

    instancingUVs2?: Float32Array<ArrayBufferLike>

    The mesh's second UV set, see UVChannel.

    layerMask: number

    Camera layer mask of the batch mesh, see ParticleSystem.layers.

    lighting?: MeshLighting

    How mesh particles are lit ('unlit', 'fixed' or 'scene'); unset is 'fixed'. See MeshLighting. Other render modes ignore it.

    mapUV?: TextureUV

    How the main map is laid over the particle, see TextureUV. Unset: as drawn. Systems that differ are batched apart.

    materialAlphaTest: number

    Alpha below which a fragment is discarded; 0 discards nothing.

    materialBlendMode: number

    Babylon alpha mode, see ParticleSystem.blending.

    materialColor?: readonly [number, number, number, number]

    See ParticleSystem.materialColor, [r, g, b, a]. Unset is white.

    materialColorScale?: number
    materialDepthTest: boolean

    Whether particles are hidden behind nearer geometry.

    materialDepthWrite: boolean

    Whether particles write depth.

    materialTransparent: boolean

    Whether the batch draws in the transparent pass.

    maxParticleSize?: number

    Largest size a billboard or stretched particle may have on screen, as a fraction of the viewport height (Unity's Max Particle Size); unlimited by default. Meshes and trails ignore it. Systems that differ are batched apart.

    minParticleSize?: number

    Smallest size a billboard or stretched particle may have on screen, as a fraction of the viewport height (Unity's Min Particle Size); 0 by default. Meshes and trails ignore it. Systems that differ are batched apart.

    particleColor?: boolean

    See ParticleSystem.particleColor. Unset is true.

    pivot?: Vector3Like

    Offset of billboard quads from their particle, in particle-size units (Unity's renderer Pivot). On billboards x/y move the quad in its own plane before it is rotated and z moves it toward the camera (up for horizontal billboards). On stretched billboards x runs from the head to the tail and y across, and z is unused. Absent or zero: no offset. Meshes ignore it.

    premultipliedMap?: boolean

    See ParticleSystem.premultipliedMap. Unset is false.

    reflectionAtlas: BaseTexture | null

    A 3×2 atlas of cube faces (+X +Y +Z over -X -Y -Z) that mesh particles reflect, through one sampler2D: the path that stays valid on iOS WebKit ShaderMaterial draws, where a samplerCube or six face samplers raise GL_INVALID_OPERATION. Built from reflectionTexture when that is a cube texture. Other render modes ignore it.

    reflectionLevel: number

    Multiplier for the reflection sample — mirrors texture.level.

    reflectionTexture: BaseTexture | null

    The reflection a mesh particle's material carries (a Babylon material's reflectionTexture or environmentTexture). It is not sampled itself: a cube texture is unfolded into reflectionAtlas once it has loaded and sampled from there; anything else is kept only to tell materials apart. Other render modes ignore it.

    renderAlignment?: RenderAlignment

    The axes a mesh particle's rotation is measured in and a billboard's quad is laid along, see RenderAlignment. Unset is 'simulation'. Mesh systems that differ are batched apart, and billboards laid along other axes than the camera's; other render modes ignore it.

    renderFace?: RenderFace

    Which faces a mesh particle draws, see RenderFace. Unset is 'both'. Mesh systems that differ are batched apart; other render modes ignore it.

    renderingGroupId: number

    Babylon rendering group (mesh.renderingGroupId) the batch draws in, 0 by default. Systems with different groups are batched apart.

    renderMode: RenderMode
    renderOrder: number
    rim?: MeshRim

    Rim (Fresnel) term on mesh particles; unset draws none. See MeshRim.

    softFarFade: number
    softNearFade: number
    softParticles: boolean
    sortingFudge?: number

    See ParticleSystem.sortingFudge. Unset is 0.

    sortMode?: SortMode

    Draw order within the batch, see SortMode. Unset is 'none'. Systems that differ are batched apart.

    texture: Texture | null
    uTileCount: number
    uvDistortion?: ParticleUVDistortion

    Map UV distortion by a noise texture, see ParticleUVDistortion. Unset: none. Systems that differ are batched apart.

    vTileCount: number