import { AttachType } from '@react-three/fiber/dist/declarations/src/core/renderer'; import { Material } from 'three'; import * as React_2 from 'react'; import * as THREE from 'three'; declare type CSMPatchMap = { [keyword: string]: { [toReplace: string]: string | { value: string; type: "fs" | "vs"; }; }; }; declare type CSMProxy = InstanceType & { vertexShader: string; fragmentShader: string; uniforms: Uniform; update: (opts: Omit, "baseMaterial">) => void; __csm: Omit, "baseMaterial"> & { prevOnBeforeCompile: THREE.Material["onBeforeCompile"]; baseMaterial: THREE.Material; }; }; declare class CustomShaderMaterial extends THREE.Material { uniforms: TYPES.Uniform; vertexShader: string; fragmentShader: string; constructor({ baseMaterial, vertexShader, fragmentShader, uniforms, patchMap, cacheKey, ...opts }: TYPES.CustomShaderMaterialParameters); update({ fragmentShader: _fs, vertexShader: _vs, uniforms, cacheKey, patchMap, }: Omit, "baseMaterial">): void; clone(): any; } declare type CustomShaderMaterialBaseParameters = { baseMaterial: T | InstanceType; vertexShader?: string; fragmentShader?: string; uniforms?: Uniform; patchMap?: CSMPatchMap; cacheKey?: () => string; }; declare type CustomShaderMaterialParameters = CustomShaderMaterialBaseParameters & (MaterialParams extends undefined ? any : MaterialParams); export declare type CustomShaderMaterialProps = CustomShaderMaterialParameters & {}; declare const _default: (props: CustomShaderMaterialProps & { ref?: React_2.Ref>; attach?: AttachType; }) => React_2.ReactElement; export default _default; declare interface IUniform { value: TValue; } declare type MaterialConstructor = new (...opts: any[]) => THREE.Material; declare type MaterialParams = ConstructorParameters[0]; declare namespace TYPES { export { IUniform, Uniform, MaterialConstructor, CSMPatchMap, CustomShaderMaterialBaseParameters, CustomShaderMaterialParameters, CSMProxy } } declare type Uniform = { [key: string]: IUniform; }; export { }