material.decalMapConfiguration.d.ts 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import { MaterialDefines } from "./materialDefines";
  2. import { MaterialPluginBase } from "./materialPluginBase";
  3. import type { Scene } from "../scene.js";
  4. import type { Engine } from "../Engines/engine.js";
  5. import type { SubMesh } from "../Meshes/subMesh.js";
  6. import type { AbstractMesh } from "../Meshes/abstractMesh.js";
  7. import type { UniformBuffer } from "./uniformBuffer";
  8. import type { PBRBaseMaterial } from "./PBR/pbrBaseMaterial";
  9. import type { StandardMaterial } from "./standardMaterial";
  10. /**
  11. * @internal
  12. */
  13. export declare class DecalMapDefines extends MaterialDefines {
  14. DECAL: boolean;
  15. DECALDIRECTUV: number;
  16. DECAL_SMOOTHALPHA: boolean;
  17. GAMMADECAL: boolean;
  18. }
  19. /**
  20. * Plugin that implements the decal map component of a material
  21. * @since 5.49.1
  22. */
  23. export declare class DecalMapConfiguration extends MaterialPluginBase {
  24. private _isEnabled;
  25. /**
  26. * Enables or disables the decal map on this material
  27. */
  28. isEnabled: boolean;
  29. private _smoothAlpha;
  30. /**
  31. * Enables or disables the smooth alpha mode on this material. Default: false.
  32. * When enabled, the alpha value used to blend the decal map will be the squared value and will produce a smoother result.
  33. */
  34. smoothAlpha: boolean;
  35. private _internalMarkAllSubMeshesAsTexturesDirty;
  36. /** @internal */
  37. _markAllSubMeshesAsTexturesDirty(): void;
  38. /**
  39. * Creates a new DecalMapConfiguration
  40. * @param material The material to attach the decal map plugin to
  41. * @param addToPluginList If the plugin should be added to the material plugin list
  42. */
  43. constructor(material: PBRBaseMaterial | StandardMaterial, addToPluginList?: boolean);
  44. isReadyForSubMesh(defines: DecalMapDefines, scene: Scene, engine: Engine, subMesh: SubMesh): boolean;
  45. prepareDefines(defines: DecalMapDefines, scene: Scene, mesh: AbstractMesh): void;
  46. hardBindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, _engine: Engine, subMesh: SubMesh): void;
  47. getClassName(): string;
  48. getSamplers(samplers: string[]): void;
  49. getUniforms(): {
  50. ubo?: Array<{
  51. name: string;
  52. size: number;
  53. type: string;
  54. }>;
  55. vertex?: string;
  56. fragment?: string;
  57. };
  58. }