f1509965c4d5ce4f10e7889d308c713eeb011c097463db0a76eb113ee7403622.json 5.2 KB

1
  1. {"ast":null,"code":"/**\n * Class used to store the global illumination parameters for a reflective shadow map.\n * Instances of this class are used by the GIRSMManager class to generate global illumination for a scene.\n */\nexport class GIRSM {\n /**\n * Creates a new GIRSM instance\n * @param rsm The reflective shadow map\n */\n constructor(rsm) {\n /**\n * The number of samples to use to generate the global illumination. Default value is 400.\n */\n this.numSamples = 400;\n /**\n * Radius of the circle in the RSM flux texture to read samples from. Default value is 0.1.\n * Valid values are between 0 and 1.\n */\n this.radius = 0.1;\n /**\n * Intensity of the global illumination effect. Default value is 0.1.\n */\n this.intensity = 0.1;\n /**\n * value used to correct for edge artifacts when calculating the global illumination effect. Default value is 0.1.\n * Will depend on your scene.\n */\n this.edgeArtifactCorrection = 0.1;\n /**\n * Defines if samples should be rotated when generating the global illumination effect. Default value is true.\n * Rotating samples will improve the quality of the global illumination effect by trading banding for noise, at the cost of a bit of performance.\n */\n this.rotateSample = true;\n /**\n * Noise scale factor, only used if rotateSample is true. Default value is 100.\n * Will depend on your scene.\n */\n this.noiseFactor = 100;\n /**\n * Defines if the full texture should be used when generating the global illumination effect. Default value is false.\n * 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.\n * 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!\n */\n this.useFullTexture = false;\n this.rsm = rsm;\n }\n /**\n * Disposes the GIRSM\n */\n dispose() {\n this.rsm.dispose();\n }\n}","map":{"version":3,"names":["GIRSM","constructor","rsm","numSamples","radius","intensity","edgeArtifactCorrection","rotateSample","noiseFactor","useFullTexture","dispose"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Rendering/GlobalIllumination/giRSM.js"],"sourcesContent":["/**\n * Class used to store the global illumination parameters for a reflective shadow map.\n * Instances of this class are used by the GIRSMManager class to generate global illumination for a scene.\n */\nexport class GIRSM {\n /**\n * Creates a new GIRSM instance\n * @param rsm The reflective shadow map\n */\n constructor(rsm) {\n /**\n * The number of samples to use to generate the global illumination. Default value is 400.\n */\n this.numSamples = 400;\n /**\n * Radius of the circle in the RSM flux texture to read samples from. Default value is 0.1.\n * Valid values are between 0 and 1.\n */\n this.radius = 0.1;\n /**\n * Intensity of the global illumination effect. Default value is 0.1.\n */\n this.intensity = 0.1;\n /**\n * value used to correct for edge artifacts when calculating the global illumination effect. Default value is 0.1.\n * Will depend on your scene.\n */\n this.edgeArtifactCorrection = 0.1;\n /**\n * Defines if samples should be rotated when generating the global illumination effect. Default value is true.\n * Rotating samples will improve the quality of the global illumination effect by trading banding for noise, at the cost of a bit of performance.\n */\n this.rotateSample = true;\n /**\n * Noise scale factor, only used if rotateSample is true. Default value is 100.\n * Will depend on your scene.\n */\n this.noiseFactor = 100;\n /**\n * Defines if the full texture should be used when generating the global illumination effect. Default value is false.\n * 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.\n * 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!\n */\n this.useFullTexture = false;\n this.rsm = rsm;\n }\n /**\n * Disposes the GIRSM\n */\n dispose() {\n this.rsm.dispose();\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA,OAAO,MAAMA,KAAK,CAAC;EACf;AACJ;AACA;AACA;EACIC,WAAWA,CAACC,GAAG,EAAE;IACb;AACR;AACA;IACQ,IAAI,CAACC,UAAU,GAAG,GAAG;IACrB;AACR;AACA;AACA;IACQ,IAAI,CAACC,MAAM,GAAG,GAAG;IACjB;AACR;AACA;IACQ,IAAI,CAACC,SAAS,GAAG,GAAG;IACpB;AACR;AACA;AACA;IACQ,IAAI,CAACC,sBAAsB,GAAG,GAAG;IACjC;AACR;AACA;AACA;IACQ,IAAI,CAACC,YAAY,GAAG,IAAI;IACxB;AACR;AACA;AACA;IACQ,IAAI,CAACC,WAAW,GAAG,GAAG;IACtB;AACR;AACA;AACA;AACA;IACQ,IAAI,CAACC,cAAc,GAAG,KAAK;IAC3B,IAAI,CAACP,GAAG,GAAGA,GAAG;EAClB;EACA;AACJ;AACA;EACIQ,OAAOA,CAAA,EAAG;IACN,IAAI,CAACR,GAAG,CAACQ,OAAO,CAAC,CAAC;EACtB;AACJ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}