gaussianSplattingMaterial.d.ts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import type { SubMesh } from "../../Meshes/subMesh";
  2. import type { AbstractMesh } from "../../Meshes/abstractMesh";
  3. import type { Mesh } from "../../Meshes/mesh";
  4. import type { Scene } from "../../scene";
  5. import type { Matrix } from "../../Maths/math.vector";
  6. import { PushMaterial } from "../../Materials/pushMaterial";
  7. import "../../Shaders/gaussianSplatting.fragment";
  8. import "../../Shaders/gaussianSplatting.vertex";
  9. /**
  10. * GaussianSplattingMaterial material used to render Gaussian Splatting
  11. * @experimental
  12. */
  13. export declare class GaussianSplattingMaterial extends PushMaterial {
  14. /**
  15. * Instantiates a Gaussian Splatting Material in the given scene
  16. * @param name The friendly name of the material
  17. * @param scene The scene to add the material to
  18. */
  19. constructor(name: string, scene?: Scene);
  20. /**
  21. * Gets a boolean indicating that current material needs to register RTT
  22. */
  23. get hasRenderTargetTextures(): boolean;
  24. /**
  25. * Specifies whether or not this material should be rendered in alpha test mode.
  26. * @returns false
  27. */
  28. needAlphaTesting(): boolean;
  29. /**
  30. * Specifies whether or not this material should be rendered in alpha blend mode.
  31. * @returns true
  32. */
  33. needAlphaBlending(): boolean;
  34. /**
  35. * Checks whether the material is ready to be rendered for a given mesh.
  36. * @param mesh The mesh to render
  37. * @param subMesh The submesh to check against
  38. * @returns true if all the dependencies are ready (Textures, Effects...)
  39. */
  40. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh): boolean;
  41. /**
  42. * Binds the submesh to this material by preparing the effect and shader to draw
  43. * @param world defines the world transformation matrix
  44. * @param mesh defines the mesh containing the submesh
  45. * @param subMesh defines the submesh to bind the material to
  46. */
  47. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  48. /**
  49. * Clones the material.
  50. * @param name The cloned name.
  51. * @returns The cloned material.
  52. */
  53. clone(name: string): GaussianSplattingMaterial;
  54. /**
  55. * Serializes the current material to its JSON representation.
  56. * @returns The JSON representation.
  57. */
  58. serialize(): any;
  59. /**
  60. * Gets the class name of the material
  61. * @returns "GaussianSplattingMaterial"
  62. */
  63. getClassName(): string;
  64. /**
  65. * Parse a JSON input to create back a Gaussian Splatting material.
  66. * @param source The JSON data to parse
  67. * @param scene The scene to create the parsed material in
  68. * @param rootUrl The root url of the assets the material depends upon
  69. * @returns the instantiated GaussianSplattingMaterial.
  70. */
  71. static Parse(source: any, scene: Scene, rootUrl: string): GaussianSplattingMaterial;
  72. }