depthOfFieldMergePostProcess.d.ts 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import type { Nullable } from "../types";
  2. import type { Camera } from "../Cameras/camera";
  3. import type { Effect } from "../Materials/effect";
  4. import type { PostProcessOptions } from "./postProcess";
  5. import { PostProcess } from "./postProcess";
  6. import "../Shaders/depthOfFieldMerge.fragment";
  7. import type { AbstractEngine } from "../Engines/abstractEngine.js";
  8. /**
  9. * The DepthOfFieldMergePostProcess merges blurred images with the original based on the values of the circle of confusion.
  10. */
  11. export declare class DepthOfFieldMergePostProcess extends PostProcess {
  12. private _blurSteps;
  13. /**
  14. * Gets a string identifying the name of the class
  15. * @returns "DepthOfFieldMergePostProcess" string
  16. */
  17. getClassName(): string;
  18. /**
  19. * Creates a new instance of DepthOfFieldMergePostProcess
  20. * @param name The name of the effect.
  21. * @param originalFromInput Post process which's input will be used for the merge.
  22. * @param circleOfConfusion Circle of confusion post process which's output will be used to blur each pixel.
  23. * @param _blurSteps Blur post processes from low to high which will be mixed with the original image.
  24. * @param options The required width/height ratio to downsize to before computing the render pass.
  25. * @param camera The camera to apply the render pass to.
  26. * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
  27. * @param engine The engine which the post process will be applied. (default: current engine)
  28. * @param reusable If the post process can be reused on the same frame. (default: false)
  29. * @param textureType Type of textures used when performing the post process. (default: 0)
  30. * @param blockCompilation If compilation of the shader should not be done in the constructor. The updateEffect method can be used to compile the shader at a later time. (default: false)
  31. */
  32. constructor(name: string, originalFromInput: PostProcess, circleOfConfusion: PostProcess, _blurSteps: Array<PostProcess>, options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: AbstractEngine, reusable?: boolean, textureType?: number, blockCompilation?: boolean);
  33. /**
  34. * Updates the effect with the current post process compile time values and recompiles the shader.
  35. * @param defines Define statements that should be added at the beginning of the shader. (default: null)
  36. * @param uniforms Set of uniform variables that will be passed to the shader. (default: null)
  37. * @param samplers Set of Texture2D variables that will be passed to the shader. (default: null)
  38. * @param indexParameters The index parameters to be used for babylons include syntax "#include<kernelBlurVaryingDeclaration>[0..varyingCount]". (default: undefined) See usage in babylon.blurPostProcess.ts and kernelBlur.vertex.fx
  39. * @param onCompiled Called when the shader has been compiled.
  40. * @param onError Called if there is an error when compiling a shader.
  41. */
  42. updateEffect(defines?: Nullable<string>, uniforms?: Nullable<string[]>, samplers?: Nullable<string[]>, indexParameters?: any, onCompiled?: (effect: Effect) => void, onError?: (effect: Effect, errors: string) => void): void;
  43. }