giRSM.d.ts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import type { ReflectiveShadowMap } from "../reflectiveShadowMap";
  2. /**
  3. * Class used to store the global illumination parameters for a reflective shadow map.
  4. * Instances of this class are used by the GIRSMManager class to generate global illumination for a scene.
  5. */
  6. export declare class GIRSM {
  7. /**
  8. * The reflective shadow map used to generate the global illumination for the corresponding light.
  9. */
  10. rsm: ReflectiveShadowMap;
  11. /**
  12. * The number of samples to use to generate the global illumination. Default value is 400.
  13. */
  14. numSamples: number;
  15. /**
  16. * Radius of the circle in the RSM flux texture to read samples from. Default value is 0.1.
  17. * Valid values are between 0 and 1.
  18. */
  19. radius: number;
  20. /**
  21. * Intensity of the global illumination effect. Default value is 0.1.
  22. */
  23. intensity: number;
  24. /**
  25. * value used to correct for edge artifacts when calculating the global illumination effect. Default value is 0.1.
  26. * Will depend on your scene.
  27. */
  28. edgeArtifactCorrection: number;
  29. /**
  30. * Defines if samples should be rotated when generating the global illumination effect. Default value is true.
  31. * Rotating samples will improve the quality of the global illumination effect by trading banding for noise, at the cost of a bit of performance.
  32. */
  33. rotateSample: boolean;
  34. /**
  35. * Noise scale factor, only used if rotateSample is true. Default value is 100.
  36. * Will depend on your scene.
  37. */
  38. noiseFactor: number;
  39. /**
  40. * Defines if the full texture should be used when generating the global illumination effect. Default value is false.
  41. * If true, values for numSamples, radius, rotateSample and noiseFactor will be ignored and the full texture will be used to generate the global illumination effect.
  42. * Be careful to use a RSM texture size small enough to limit the number of samples! For eg. a 32x32 texture will generate 1024 samples per pixel!
  43. */
  44. useFullTexture: boolean;
  45. /**
  46. * Creates a new GIRSM instance
  47. * @param rsm The reflective shadow map
  48. */
  49. constructor(rsm: ReflectiveShadowMap);
  50. /**
  51. * Disposes the GIRSM
  52. */
  53. dispose(): void;
  54. }