import { BoundingBox, Vector4 } from "@galacean/engine-math";
import { SpriteMaskInteraction } from "./2d/enums/SpriteMaskInteraction";
import { Component } from "./Component";
import { Entity } from "./Entity";
import { RenderContext } from "./RenderPipeline/RenderContext";
import { TransformModifyFlags } from "./Transform";
import { SpriteMaskLayer } from "./enums/SpriteMaskLayer";
import { Material } from "./material";
import { ShaderData } from "./shader/ShaderData";
/**
 * Basis for all renderers.
 * @decorator `@dependentComponents(Transform, DependentMode.CheckOnly)`
 */
export declare class Renderer extends Component {
    private static _tempVector0;
    private static _receiveShadowMacro;
    private static _mvMatrixProperty;
    private static _mvpMatrixProperty;
    private static _normalMatrixProperty;
    _renderFrameCount: number;
    _maskInteraction: SpriteMaskInteraction;
    _maskLayer: SpriteMaskLayer;
    protected _overrideUpdate: boolean;
    protected _materials: Material[];
    protected _dirtyUpdateFlag: number;
    protected _rendererLayer: Vector4;
    protected _bounds: BoundingBox;
    protected _transformEntity: Entity;
    private _shaderData;
    private _mvMatrix;
    private _mvpMatrix;
    private _normalMatrix;
    private _materialsInstanced;
    private _priority;
    private _receiveShadows;
    /**
     * ShaderData related to renderer.
     */
    get shaderData(): ShaderData;
    /**
     * Whether it is culled in the current frame and does not participate in rendering.
     */
    get isCulled(): boolean;
    /**
     * Whether receive shadow.
     */
    get receiveShadows(): boolean;
    set receiveShadows(value: boolean);
    /** Whether cast shadow. */
    castShadows: boolean;
    /**
     * Material count.
     */
    get materialCount(): number;
    set materialCount(value: number);
    /**
     * The world bounding volume of the renderer.
     */
    get bounds(): BoundingBox;
    /**
     * The render priority of the renderer, lower values are rendered first and higher values are rendered last.
     */
    get priority(): number;
    set priority(value: number);
    /**
     * Get the first instance material.
     * @returns The first instance material
     */
    getInstanceMaterial(): Material | null;
    /**
     * Get the first instance material by index.
     * @remarks Calling this function for the first time after the material is set will create an instance material to ensure that it is unique to the renderer.
     * @param index - Material index
     * @returns Instance material
     */
    getInstanceMaterial(index: number): Material | null;
    /**
     * Get the first material.
     * @returns The first material
     */
    getMaterial(): Material | null;
    /**
     * Get the first material by index.
     * @param index - Material index
     * @returns Material
     */
    getMaterial(index: number): Material | null;
    /**
     * Set the first material.
     * @param material - The first material
     */
    setMaterial(material: Material): void;
    /**
     * Set material by index.
     * @param index - Material index
     * @param material - The material
     */
    setMaterial(index: number, material: Material): void;
    /**
     * Get all instance materials.
     * @remarks Calling this function for the first time after the material is set will create an instance material to ensure that it is unique to the renderer.
     * @returns All instance materials
     */
    getInstanceMaterials(): Readonly<Material[]>;
    /**
     * Get all materials.
     * @returns All materials
     */
    getMaterials(): Readonly<Material[]>;
    /**
     * Set all materials.
     * @param materials - All materials
     */
    setMaterials(materials: Material[]): void;
    update(deltaTime: number): void;
    /**
     * Update once per frame per renderer.
     */
    protected _update(context: RenderContext): void;
    /**
     * Update transform shader data for world-space vertices (2D renderers).
     * Vertices are already in world space, so model matrix is identity.
     */
    protected _updateWorldSpaceTransformShaderData(context: RenderContext, onlyMVP: boolean): void;
    protected _updateBounds(worldBounds: BoundingBox): void;
    protected _render(context: RenderContext): void;
    private _createInstanceMaterial;
    private _setMaterial;
    protected _onTransformChanged(type: TransformModifyFlags): void;
}
export declare enum RendererUpdateFlags {
    /** Include world position and world bounds. */
    WorldVolume = 1
}
