import { type UniformValue } from "./RenderDevice";
export type CullMode = "none" | "back" | "front";
export type DepthCompare = "always" | "less-equal";
export type ColorWriteMask = readonly [boolean, boolean, boolean, boolean];
export type StencilCompare = "never" | "less" | "less-equal" | "greater" | "greater-equal" | "equal" | "not-equal" | "always";
export type StencilOperation = "keep" | "zero" | "replace" | "increment" | "decrement" | "invert" | "increment-wrap" | "decrement-wrap";
export interface ScissorRect {
    readonly x: number;
    readonly y: number;
    readonly width: number;
    readonly height: number;
}
export interface PolygonOffsetState {
    readonly factor: number;
    readonly units: number;
}
export interface StencilState {
    readonly compare?: StencilCompare;
    readonly reference?: number;
    readonly readMask?: number;
    readonly writeMask?: number;
    readonly fail?: StencilOperation;
    readonly depthFail?: StencilOperation;
    readonly depthPass?: StencilOperation;
}
export interface RenderState {
    readonly depthTest: boolean;
    readonly depthWrite: boolean;
    readonly cullMode: CullMode;
    readonly blend: boolean;
    readonly depthCompare: DepthCompare;
    readonly colorWrite: ColorWriteMask;
    readonly scissor?: ScissorRect | null;
    readonly polygonOffset?: PolygonOffsetState | null;
    readonly stencil?: StencilState | null;
}
export type MaterialUniformKind = "any" | "float" | "vec2" | "vec3" | "vec4" | "mat4" | "texture2d" | "textureCube";
export interface MaterialUniformDescriptor {
    readonly name: string;
    readonly kind: MaterialUniformKind;
    readonly required?: boolean;
}
export interface MaterialDescriptor {
    readonly name?: string;
    readonly shaderKey: string;
    readonly shaderVariant?: string;
    readonly renderState?: Partial<RenderState>;
    readonly parameters?: Readonly<Record<string, UniformValue>>;
    readonly requiredAttributes?: readonly string[];
    readonly requiredUniforms?: readonly string[];
    readonly uniformSchema?: readonly MaterialUniformDescriptor[];
}
export declare const DEFAULT_RENDER_STATE: RenderState;
export declare class Material {
    disposed: boolean;
    readonly name: string;
    readonly shaderKey: string;
    readonly shaderVariant?: string;
    readonly renderState: RenderState;
    readonly requiredAttributes: readonly string[];
    readonly requiredUniforms: readonly string[];
    readonly uniformSchema: readonly MaterialUniformDescriptor[];
    protected readonly parameters: Map<string, UniformValue>;
    private dirty;
    private revision;
    constructor(descriptor: MaterialDescriptor);
    setParameter(name: string, value: UniformValue): void;
    getParameter(name: string): UniformValue | undefined;
    getParameters(): ReadonlyMap<string, UniformValue>;
    isDirty(): boolean;
    getRevision(): number;
    markClean(): void;
    dispose(): void;
    private assertAlive;
}
export declare function validateRenderState(state: RenderState): RenderState;
//# sourceMappingURL=Material.d.ts.map