depthOfFieldBlurPostProcess.d.ts 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import type { Nullable } from "../types";
  2. import type { Vector2 } from "../Maths/math.vector";
  3. import type { Camera } from "../Cameras/camera";
  4. import type { PostProcess, PostProcessOptions } from "./postProcess";
  5. import { BlurPostProcess } from "./blurPostProcess";
  6. import type { Scene } from "../scene";
  7. import type { AbstractEngine } from "../Engines/abstractEngine.js";
  8. /**
  9. * The DepthOfFieldBlurPostProcess applied a blur in a give direction.
  10. * This blur differs from the standard BlurPostProcess as it attempts to avoid blurring pixels
  11. * based on samples that have a large difference in distance than the center pixel.
  12. * See section 2.6.2 http://fileadmin.cs.lth.se/cs/education/edan35/lectures/12dof.pdf
  13. */
  14. export declare class DepthOfFieldBlurPostProcess extends BlurPostProcess {
  15. /**
  16. * The direction the blur should be applied
  17. */
  18. direction: Vector2;
  19. /**
  20. * Gets a string identifying the name of the class
  21. * @returns "DepthOfFieldBlurPostProcess" string
  22. */
  23. getClassName(): string;
  24. /**
  25. * Creates a new instance DepthOfFieldBlurPostProcess
  26. * @param name The name of the effect.
  27. * @param scene The scene the effect belongs to.
  28. * @param direction The direction the blur should be applied.
  29. * @param kernel The size of the kernel used to blur.
  30. * @param options The required width/height ratio to downsize to before computing the render pass.
  31. * @param camera The camera to apply the render pass to.
  32. * @param circleOfConfusion The circle of confusion + depth map to be used to avoid blurring across edges
  33. * @param imageToBlur The image to apply the blur to (default: Current rendered frame)
  34. * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
  35. * @param engine The engine which the post process will be applied. (default: current engine)
  36. * @param reusable If the post process can be reused on the same frame. (default: false)
  37. * @param textureType Type of textures used when performing the post process. (default: 0)
  38. * @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)
  39. * @param textureFormat Format of textures used when performing the post process. (default: TEXTUREFORMAT_RGBA)
  40. */
  41. constructor(name: string, scene: Scene, direction: Vector2, kernel: number, options: number | PostProcessOptions, camera: Nullable<Camera>, circleOfConfusion: PostProcess, imageToBlur?: Nullable<PostProcess>, samplingMode?: number, engine?: AbstractEngine, reusable?: boolean, textureType?: number, blockCompilation?: boolean, textureFormat?: number);
  42. }