/** * Copyright (c) 2021-2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose */ import { MeshValues } from '../../../mol-gl/renderable/mesh.js'; import { TextureImage } from '../../../mol-gl/renderable/util.js'; import { WebGLContext } from '../../../mol-gl/webgl/context.js'; import { Texture } from '../../../mol-gl/webgl/texture.js'; import { Sphere3D } from '../../../mol-math/geometry.js'; import { Vec2, Vec3, Vec4 } from '../../../mol-math/linear-algebra.js'; interface ColorSmoothingInput { vertexCount: number; instanceCount: number; groupCount: number; transformBuffer: Float32Array; instanceBuffer: Float32Array; positionBuffer: Float32Array; groupBuffer: Float32Array; colorData: TextureImage; colorType: 'group' | 'groupInstance'; boundingSphere: Sphere3D; invariantBoundingSphere: Sphere3D; itemSize: 4 | 3 | 1; } export type ColorSmoothingOptions = { resolution: number; stride: number; }; export declare function calcMeshColorSmoothing(input: ColorSmoothingInput, options: ColorSmoothingOptions, webgl?: WebGLContext, texture?: Texture): { kind: "volume"; texture: Texture; gridTexDim: Vec2; gridDim: Vec3; gridTransform: Vec4; type: "volume" | "volumeInstance"; texDim?: undefined; } | { kind: "vertex"; texture: TextureImage>; texDim: Vec2; type: string; gridTexDim?: undefined; gridDim?: undefined; gridTransform?: undefined; }; interface ColorInterpolationInput { vertexCount: number; instanceCount: number; transformBuffer: Float32Array; positionBuffer: Float32Array; colorType: 'volumeInstance' | 'volume'; grid: Uint8Array; gridTexDim: Vec2; gridDim: Vec3; gridTransform: Vec4; vertexStride: 3 | 4; colorStride: 1 | 3 | 4; outputStride: 1 | 3 | 4; itemOffset?: 0 | 1 | 2 | 3; } export declare function getTrilinearlyInterpolated(input: ColorInterpolationInput): TextureImage; export declare function applyMeshColorSmoothing(values: MeshValues, options: ColorSmoothingOptions, webgl?: WebGLContext, colorTexture?: Texture): void; export declare function applyMeshOverpaintSmoothing(values: MeshValues, options: ColorSmoothingOptions, webgl?: WebGLContext, colorTexture?: Texture): void; export declare function applyMeshTransparencySmoothing(values: MeshValues, options: ColorSmoothingOptions, webgl?: WebGLContext, colorTexture?: Texture): void; export declare function applyMeshEmissiveSmoothing(values: MeshValues, options: ColorSmoothingOptions, webgl?: WebGLContext, colorTexture?: Texture): void; export declare function applyMeshSubstanceSmoothing(values: MeshValues, options: ColorSmoothingOptions, webgl?: WebGLContext, colorTexture?: Texture): void; export {};