prePassConfiguration.d.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import type { Matrix } from "../Maths/math.vector";
  2. import type { Mesh } from "../Meshes/mesh";
  3. import type { Scene } from "../scene";
  4. import type { Effect } from "../Materials/effect";
  5. /**
  6. * Configuration needed for prepass-capable materials
  7. */
  8. export declare class PrePassConfiguration {
  9. /**
  10. * Previous world matrices of meshes carrying this material
  11. * Used for computing velocity
  12. */
  13. previousWorldMatrices: {
  14. [index: number]: Matrix;
  15. };
  16. /**
  17. * Previous view project matrix
  18. * Used for computing velocity
  19. */
  20. previousViewProjection: Matrix;
  21. /**
  22. * Current view projection matrix
  23. * Used for computing velocity
  24. */
  25. currentViewProjection: Matrix;
  26. /**
  27. * Previous bones of meshes carrying this material
  28. * Used for computing velocity
  29. */
  30. previousBones: {
  31. [index: number]: Float32Array;
  32. };
  33. private _lastUpdateFrameId;
  34. /**
  35. * Add the required uniforms to the current list.
  36. * @param uniforms defines the current uniform list.
  37. */
  38. static AddUniforms(uniforms: string[]): void;
  39. /**
  40. * Add the required samplers to the current list.
  41. * @param samplers defines the current sampler list.
  42. */
  43. static AddSamplers(samplers: string[]): void;
  44. /**
  45. * Binds the material data.
  46. * @param effect defines the effect to update
  47. * @param scene defines the scene the material belongs to.
  48. * @param mesh The mesh
  49. * @param world World matrix of this mesh
  50. * @param isFrozen Is the material frozen
  51. */
  52. bindForSubMesh(effect: Effect, scene: Scene, mesh: Mesh, world: Matrix, isFrozen: boolean): void;
  53. }