1 |
- {"ast":null,"code":"import { FrameGraphBlurTask } from \"./blurTask.js\";\nimport { ThinDepthOfFieldBlurPostProcess } from \"../../../PostProcesses/thinDepthOfFieldBlurPostProcess.js\";\nimport { Vector2 } from \"../../../Maths/math.vector.js\";\n/**\n * @internal\n */\nexport class FrameGraphDepthOfFieldBlurTask extends FrameGraphBlurTask {\n constructor(name, frameGraph, thinPostProcess) {\n super(name, frameGraph, thinPostProcess || new ThinDepthOfFieldBlurPostProcess(name, frameGraph.engine, new Vector2(1, 0), 10));\n this.circleOfConfusionSamplingMode = 2;\n }\n record(skipCreationOfDisabledPasses = false) {\n if (this.sourceTexture === undefined || this.circleOfConfusionTexture === undefined) {\n throw new Error(`FrameGraphDepthOfFieldBlurTask \"${this.name}\": sourceTexture and circleOfConfusionTexture are required`);\n }\n const pass = super.record(skipCreationOfDisabledPasses, context => {\n context.setTextureSamplingMode(this.circleOfConfusionTexture, this.circleOfConfusionSamplingMode);\n }, context => {\n context.bindTextureHandle(this._postProcessDrawWrapper.effect, \"circleOfConfusionSampler\", this.circleOfConfusionTexture);\n });\n pass.useTexture(this.circleOfConfusionTexture);\n return pass;\n }\n}","map":{"version":3,"names":["FrameGraphBlurTask","ThinDepthOfFieldBlurPostProcess","Vector2","FrameGraphDepthOfFieldBlurTask","constructor","name","frameGraph","thinPostProcess","engine","circleOfConfusionSamplingMode","record","skipCreationOfDisabledPasses","sourceTexture","undefined","circleOfConfusionTexture","Error","pass","context","setTextureSamplingMode","bindTextureHandle","_postProcessDrawWrapper","effect","useTexture"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.js"],"sourcesContent":["\nimport { FrameGraphBlurTask } from \"./blurTask.js\";\nimport { ThinDepthOfFieldBlurPostProcess } from \"../../../PostProcesses/thinDepthOfFieldBlurPostProcess.js\";\nimport { Vector2 } from \"../../../Maths/math.vector.js\";\n/**\n * @internal\n */\nexport class FrameGraphDepthOfFieldBlurTask extends FrameGraphBlurTask {\n constructor(name, frameGraph, thinPostProcess) {\n super(name, frameGraph, thinPostProcess || new ThinDepthOfFieldBlurPostProcess(name, frameGraph.engine, new Vector2(1, 0), 10));\n this.circleOfConfusionSamplingMode = 2;\n }\n record(skipCreationOfDisabledPasses = false) {\n if (this.sourceTexture === undefined || this.circleOfConfusionTexture === undefined) {\n throw new Error(`FrameGraphDepthOfFieldBlurTask \"${this.name}\": sourceTexture and circleOfConfusionTexture are required`);\n }\n const pass = super.record(skipCreationOfDisabledPasses, (context) => {\n context.setTextureSamplingMode(this.circleOfConfusionTexture, this.circleOfConfusionSamplingMode);\n }, (context) => {\n context.bindTextureHandle(this._postProcessDrawWrapper.effect, \"circleOfConfusionSampler\", this.circleOfConfusionTexture);\n });\n pass.useTexture(this.circleOfConfusionTexture);\n return pass;\n }\n}\n"],"mappings":"AACA,SAASA,kBAAkB,QAAQ,eAAe;AAClD,SAASC,+BAA+B,QAAQ,2DAA2D;AAC3G,SAASC,OAAO,QAAQ,+BAA+B;AACvD;AACA;AACA;AACA,OAAO,MAAMC,8BAA8B,SAASH,kBAAkB,CAAC;EACnEI,WAAWA,CAACC,IAAI,EAAEC,UAAU,EAAEC,eAAe,EAAE;IAC3C,KAAK,CAACF,IAAI,EAAEC,UAAU,EAAEC,eAAe,IAAI,IAAIN,+BAA+B,CAACI,IAAI,EAAEC,UAAU,CAACE,MAAM,EAAE,IAAIN,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC/H,IAAI,CAACO,6BAA6B,GAAG,CAAC;EAC1C;EACAC,MAAMA,CAACC,4BAA4B,GAAG,KAAK,EAAE;IACzC,IAAI,IAAI,CAACC,aAAa,KAAKC,SAAS,IAAI,IAAI,CAACC,wBAAwB,KAAKD,SAAS,EAAE;MACjF,MAAM,IAAIE,KAAK,CAAC,mCAAmC,IAAI,CAACV,IAAI,4DAA4D,CAAC;IAC7H;IACA,MAAMW,IAAI,GAAG,KAAK,CAACN,MAAM,CAACC,4BAA4B,EAAGM,OAAO,IAAK;MACjEA,OAAO,CAACC,sBAAsB,CAAC,IAAI,CAACJ,wBAAwB,EAAE,IAAI,CAACL,6BAA6B,CAAC;IACrG,CAAC,EAAGQ,OAAO,IAAK;MACZA,OAAO,CAACE,iBAAiB,CAAC,IAAI,CAACC,uBAAuB,CAACC,MAAM,EAAE,0BAA0B,EAAE,IAAI,CAACP,wBAAwB,CAAC;IAC7H,CAAC,CAAC;IACFE,IAAI,CAACM,UAAU,CAAC,IAAI,CAACR,wBAAwB,CAAC;IAC9C,OAAOE,IAAI;EACf;AACJ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|