1234567891011121314151617181920212223242526 |
- System.register("chunks:///_virtual/builtin-pipeline-settings.ts",["./rollupPluginModLoBabelHelpers.js","cc","./builtin-pipeline-types.ts"],(function(t){var e,o,i,n,r,s,p,a,l,g,c,y,d,u,h,f,b;return{setters:[function(t){e=t.applyDecoratedDescriptor,o=t.inheritsLoose,i=t.initializerDefineProperty,n=t.assertThisInitialized,r=t.createClass},function(t){s=t.cclegacy,p=t._decorator,a=t.Camera,l=t.CCBoolean,g=t.CCInteger,c=t.CCFloat,y=t.Material,d=t.Texture2D,u=t.rendering,h=t.Component},function(t){f=t.fillRequiredPipelineSettings,b=t.makePipelineSettings}],execute:function(){var m,P,_,O,M,D,S,F,w,k,E,G,C,j,v,A,R,x,B,I,T,L,X,z,H,q,Y,N,Q,Z,J,K,U,V;s._RF.push({},"de1c2EHcMhAIYRZY5nyTQHG","builtin-pipeline-settings",void 0);var W=p.ccclass,$=p.disallowMultiple,tt=p.executeInEditMode,et=p.menu,ot=p.property,it=p.requireComponent,nt=p.type;t("BuiltinPipelineSettings",(m=W("BuiltinPipelineSettings"),P=et("Rendering/BuiltinPipelineSettings"),_=it(a),O=ot(l),M=ot({displayName:"Editor Preview (Experimental)",type:l}),D=ot({group:{id:"MSAA",name:"Multisample Anti-Aliasing"},type:l}),S=ot({group:{id:"MSAA",name:"Multisample Anti-Aliasing",style:"section"},type:g,range:[2,4,2]}),F=ot({group:{id:"ShadingScale",name:"ShadingScale",style:"section"},type:l}),w=ot({tooltip:"i18n:postprocess.shadingScale",group:{id:"ShadingScale",name:"ShadingScale"},type:c,range:[.01,4,.01],slide:!0}),k=ot({group:{id:"DepthOfField",name:"DepthOfField (PostProcessing)",style:"section"},type:l,visible:!1}),E=ot({group:{id:"DepthOfField",name:"DepthOfField (PostProcessing)",style:"section"},type:y,visible:!1}),G=ot({group:{id:"DepthOfField",name:"DepthOfField (PostProcessing)",style:"section"},type:c,min:0,visible:!1}),C=ot({group:{id:"DepthOfField",name:"DepthOfField (PostProcessing)",style:"section"},type:c,min:0,visible:!1}),j=nt(c),v=ot({group:{id:"DepthOfField",name:"DepthOfField (PostProcessing)",style:"section"},type:c,range:[1,10,.01],slide:!0,visible:!1}),A=ot({group:{id:"Bloom",name:"Bloom (PostProcessing)",style:"section"},type:l}),R=ot({group:{id:"Bloom",name:"Bloom (PostProcessing)",style:"section"},type:y}),x=ot({tooltip:"i18n:bloom.enableAlphaMask",group:{id:"Bloom",name:"Bloom (PostProcessing)",style:"section"},type:l}),B=ot({tooltip:"i18n:bloom.iterations",group:{id:"Bloom",name:"Bloom (PostProcessing)",style:"section"},type:g,range:[1,6,1],slide:!0}),I=ot({tooltip:"i18n:bloom.threshold",group:{id:"Bloom",name:"Bloom (PostProcessing)",style:"section"},type:c,min:0}),T=ot({group:{id:"Color Grading",name:"ColorGrading (LDR) (PostProcessing)",style:"section"},type:l}),L=ot({group:{id:"Color Grading",name:"ColorGrading (LDR) (PostProcessing)",style:"section"},type:y}),X=ot({tooltip:"i18n:color_grading.contribute",group:{id:"Color Grading",name:"ColorGrading (LDR) (PostProcessing)",style:"section"},type:c,range:[0,1,.01],slide:!0}),z=ot({tooltip:"i18n:color_grading.originalMap",group:{id:"Color Grading",name:"ColorGrading (LDR) (PostProcessing)",style:"section"},type:d}),H=ot({group:{id:"FXAA",name:"Fast Approximate Anti-Aliasing (PostProcessing)",style:"section"},type:l}),q=ot({group:{id:"FXAA",name:"Fast Approximate Anti-Aliasing (PostProcessing)",style:"section"},type:y}),Y=ot({group:{id:"FSR",name:"FidelityFX Super Resolution",style:"section"},type:l}),N=ot({group:{id:"FSR",name:"FidelityFX Super Resolution",style:"section"},type:y}),Q=ot({group:{id:"FSR",name:"FidelityFX Super Resolution",style:"section"},type:c,range:[0,1,.01],slide:!0}),Z=ot({group:{id:"ToneMapping",name:"ToneMapping",style:"section"},type:y}),m(J=P(J=_(J=$(J=tt((U=e((K=function(t){function e(){for(var e,o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return e=t.call.apply(t,[this].concat(r))||this,i(e,"_settings",U,n(e)),i(e,"_editorPreview",V,n(e)),e}o(e,t);var s=e.prototype;return s.onEnable=function(){f(this._settings),this.getComponent(a).camera.pipelineSettings=this._settings},s.onDisable=function(){this.getComponent(a).camera.pipelineSettings=null},s._tryEnableEditorPreview=function(){void 0!==u&&(this._editorPreview?u.setEditorPipelineSettings(this._settings):this._disableEditorPreview())},s._disableEditorPreview=function(){void 0!==u&&(u.getEditorPipelineSettings()===this._settings&&u.setEditorPipelineSettings(null))},r(e,[{key:"editorPreview",get:function(){return this._editorPreview},set:function(t){this._editorPreview=t}},{key:"MsaaEnable",get:function(){return this._settings.msaa.enabled},set:function(t){this._settings.msaa.enabled=t}},{key:"msaaSampleCount",get:function(){return this._settings.msaa.sampleCount},set:function(t){t=Math.pow(2,Math.ceil(Math.log2(Math.max(t,2)))),t=Math.min(t,4),this._settings.msaa.sampleCount=t}},{key:"shadingScaleEnable",get:function(){return this._settings.enableShadingScale},set:function(t){this._settings.enableShadingScale=t}},{key:"shadingScale",get:function(){return this._settings.shadingScale},set:function(t){this._settings.shadingScale=t}},{key:"dofEnable",get:function(){return this._settings.depthOfField.enabled},set:function(t){this._settings.depthOfField.enabled=t}},{key:"dofMaterial",get:function(){return this._settings.depthOfField.material},set:function(t){this._settings.depthOfField.material!==t&&(this._settings.depthOfField.material=t)}},{key:"dofFocusDistance",get:function(){return this._settings.depthOfField.focusDistance},set:function(t){this._settings.depthOfField.focusDistance=t}},{key:"dofFocusRange",get:function(){return this._settings.depthOfField.focusRange},set:function(t){this._settings.depthOfField.focusRange=t}},{key:"dofBokehRadius",get:function(){return this._settings.depthOfField.bokehRadius},set:function(t){this._settings.depthOfField.bokehRadius=t}},{key:"bloomEnable",get:function(){return this._settings.bloom.enabled},set:function(t){this._settings.bloom.enabled=t}},{key:"bloomMaterial",get:function(){return this._settings.bloom.material},set:function(t){this._settings.bloom.material!==t&&(this._settings.bloom.material=t)}},{key:"bloomEnableAlphaMask",get:function(){return this._settings.bloom.enableAlphaMask},set:function(t){this._settings.bloom.enableAlphaMask=t}},{key:"bloomIterations",get:function(){return this._settings.bloom.iterations},set:function(t){this._settings.bloom.iterations=t}},{key:"bloomThreshold",get:function(){return this._settings.bloom.threshold},set:function(t){this._settings.bloom.threshold=t}},{key:"bloomIntensity",get:function(){return this._settings.bloom.intensity},set:function(t){this._settings.bloom.intensity=t}},{key:"colorGradingEnable",get:function(){return this._settings.colorGrading.enabled},set:function(t){this._settings.colorGrading.enabled=t}},{key:"colorGradingMaterial",get:function(){return this._settings.colorGrading.material},set:function(t){this._settings.colorGrading.material!==t&&(this._settings.colorGrading.material=t)}},{key:"colorGradingContribute",get:function(){return this._settings.colorGrading.contribute},set:function(t){this._settings.colorGrading.contribute=t}},{key:"colorGradingMap",get:function(){return this._settings.colorGrading.colorGradingMap},set:function(t){this._settings.colorGrading.colorGradingMap=t}},{key:"fxaaEnable",get:function(){return this._settings.fxaa.enabled},set:function(t){this._settings.fxaa.enabled=t}},{key:"fxaaMaterial",get:function(){return this._settings.fxaa.material},set:function(t){this._settings.fxaa.material!==t&&(this._settings.fxaa.material=t)}},{key:"fsrEnable",get:function(){return this._settings.fsr.enabled},set:function(t){this._settings.fsr.enabled=t}},{key:"fsrMaterial",get:function(){return this._settings.fsr.material},set:function(t){this._settings.fsr.material!==t&&(this._settings.fsr.material=t)}},{key:"fsrSharpness",get:function(){return this._settings.fsr.sharpness},set:function(t){this._settings.fsr.sharpness=t}},{key:"toneMappingMaterial",get:function(){return this._settings.toneMapping.material},set:function(t){this._settings.toneMapping.material!==t&&(this._settings.toneMapping.material=t)}}]),e}(h)).prototype,"_settings",[ot],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return b()}}),V=e(K.prototype,"_editorPreview",[O],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),e(K.prototype,"editorPreview",[M],Object.getOwnPropertyDescriptor(K.prototype,"editorPreview"),K.prototype),e(K.prototype,"MsaaEnable",[D],Object.getOwnPropertyDescriptor(K.prototype,"MsaaEnable"),K.prototype),e(K.prototype,"msaaSampleCount",[S],Object.getOwnPropertyDescriptor(K.prototype,"msaaSampleCount"),K.prototype),e(K.prototype,"shadingScaleEnable",[F],Object.getOwnPropertyDescriptor(K.prototype,"shadingScaleEnable"),K.prototype),e(K.prototype,"shadingScale",[w],Object.getOwnPropertyDescriptor(K.prototype,"shadingScale"),K.prototype),e(K.prototype,"dofEnable",[k],Object.getOwnPropertyDescriptor(K.prototype,"dofEnable"),K.prototype),e(K.prototype,"dofMaterial",[E],Object.getOwnPropertyDescriptor(K.prototype,"dofMaterial"),K.prototype),e(K.prototype,"dofFocusDistance",[G],Object.getOwnPropertyDescriptor(K.prototype,"dofFocusDistance"),K.prototype),e(K.prototype,"dofFocusRange",[C],Object.getOwnPropertyDescriptor(K.prototype,"dofFocusRange"),K.prototype),e(K.prototype,"dofBokehRadius",[j,v],Object.getOwnPropertyDescriptor(K.prototype,"dofBokehRadius"),K.prototype),e(K.prototype,"bloomEnable",[A],Object.getOwnPropertyDescriptor(K.prototype,"bloomEnable"),K.prototype),e(K.prototype,"bloomMaterial",[R],Object.getOwnPropertyDescriptor(K.prototype,"bloomMaterial"),K.prototype),e(K.prototype,"bloomEnableAlphaMask",[x],Object.getOwnPropertyDescriptor(K.prototype,"bloomEnableAlphaMask"),K.prototype),e(K.prototype,"bloomIterations",[B],Object.getOwnPropertyDescriptor(K.prototype,"bloomIterations"),K.prototype),e(K.prototype,"bloomThreshold",[I],Object.getOwnPropertyDescriptor(K.prototype,"bloomThreshold"),K.prototype),e(K.prototype,"colorGradingEnable",[T],Object.getOwnPropertyDescriptor(K.prototype,"colorGradingEnable"),K.prototype),e(K.prototype,"colorGradingMaterial",[L],Object.getOwnPropertyDescriptor(K.prototype,"colorGradingMaterial"),K.prototype),e(K.prototype,"colorGradingContribute",[X],Object.getOwnPropertyDescriptor(K.prototype,"colorGradingContribute"),K.prototype),e(K.prototype,"colorGradingMap",[z],Object.getOwnPropertyDescriptor(K.prototype,"colorGradingMap"),K.prototype),e(K.prototype,"fxaaEnable",[H],Object.getOwnPropertyDescriptor(K.prototype,"fxaaEnable"),K.prototype),e(K.prototype,"fxaaMaterial",[q],Object.getOwnPropertyDescriptor(K.prototype,"fxaaMaterial"),K.prototype),e(K.prototype,"fsrEnable",[Y],Object.getOwnPropertyDescriptor(K.prototype,"fsrEnable"),K.prototype),e(K.prototype,"fsrMaterial",[N],Object.getOwnPropertyDescriptor(K.prototype,"fsrMaterial"),K.prototype),e(K.prototype,"fsrSharpness",[Q],Object.getOwnPropertyDescriptor(K.prototype,"fsrSharpness"),K.prototype),e(K.prototype,"toneMappingMaterial",[Z],Object.getOwnPropertyDescriptor(K.prototype,"toneMappingMaterial"),K.prototype),J=K))||J)||J)||J)||J)||J));s._RF.pop()}}}));
- System.register("chunks:///_virtual/builtin-pipeline-types.ts",["cc"],(function(e){var a,n;return{setters:[function(e){a=e.cclegacy,n=e.gfx}],execute:function(){e({fillRequiredBloom:u,fillRequiredColorGrading:c,fillRequiredDepthOfField:r,fillRequiredFSR:f,fillRequiredFXAA:p,fillRequiredHBAO:function(e){void 0===e.enabled&&(e.enabled=!1);void 0===e.radiusScale&&(e.radiusScale=1);void 0===e.angleBiasDegree&&(e.angleBiasDegree=10);void 0===e.blurSharpness&&(e.blurSharpness=3);void 0===e.aoSaturation&&(e.aoSaturation=1);void 0===e.needBlur&&(e.needBlur=!1)},fillRequiredMSAA:t,fillRequiredPipelineSettings:function(e){e.msaa?t(e.msaa):e.msaa=i();void 0===e.enableShadingScale&&(e.enableShadingScale=!1);void 0===e.shadingScale&&(e.shadingScale=.5);e.depthOfField?r(e.depthOfField):e.depthOfField={enabled:!1,material:null,focusDistance:0,focusRange:0,bokehRadius:1};e.bloom?u(e.bloom):e.bloom={enabled:!1,material:null,enableAlphaMask:!1,iterations:3,threshold:.8,intensity:2.3};e.toneMapping?g(e.toneMapping):e.toneMapping={material:null};e.colorGrading?c(e.colorGrading):e.colorGrading={enabled:!1,material:null,contribute:1,colorGradingMap:null};e.fsr?f(e.fsr):e.fsr={enabled:!1,material:null,sharpness:.8};e.fxaa?p(e.fxaa):e.fxaa={enabled:!1,material:null}},fillRequiredToneMapping:g,makeBloom:d,makeColorGrading:s,makeDepthOfField:o,makeFSR:b,makeFXAA:m,makeHBAO:function(){return{enabled:!1,radiusScale:1,angleBiasDegree:10,blurSharpness:3,aoSaturation:1,needBlur:!1}},makeMSAA:i,makePipelineSettings:function(){return{msaa:i(),enableShadingScale:!1,shadingScale:.5,depthOfField:{enabled:!1,material:null,focusDistance:0,focusRange:0,bokehRadius:1},bloom:{enabled:!1,material:null,enableAlphaMask:!1,iterations:3,threshold:.8,intensity:2.3},toneMapping:{material:null},colorGrading:{enabled:!1,material:null,contribute:1,colorGradingMap:null},fsr:{enabled:!1,material:null,sharpness:.8},fxaa:{enabled:!1,material:null}}},makeToneMapping:h}),a._RF.push({},"cbf30kCUX9A3K+QpVC6wnzx","builtin-pipeline-types",void 0);var l=n.SampleCount;function i(){return{enabled:!1,sampleCount:l.X4}}function t(e){void 0===e.enabled&&(e.enabled=!1),void 0===e.sampleCount&&(e.sampleCount=l.X4)}function o(){return{enabled:!1,material:null,focusDistance:0,focusRange:0,bokehRadius:1}}function r(e){void 0===e.enabled&&(e.enabled=!1),void 0===e.material&&(e.material=null),void 0===e.focusDistance&&(e.focusDistance=0),void 0===e.focusRange&&(e.focusRange=0),void 0===e.bokehRadius&&(e.bokehRadius=1)}function d(){return{enabled:!1,material:null,enableAlphaMask:!1,iterations:3,threshold:.8,intensity:2.3}}function u(e){void 0===e.enabled&&(e.enabled=!1),void 0===e.material&&(e.material=null),void 0===e.enableAlphaMask&&(e.enableAlphaMask=!1),void 0===e.iterations&&(e.iterations=3),void 0===e.threshold&&(e.threshold=.8),void 0===e.intensity&&(e.intensity=2.3)}function s(){return{enabled:!1,material:null,contribute:1,colorGradingMap:null}}function c(e){void 0===e.enabled&&(e.enabled=!1),void 0===e.material&&(e.material=null),void 0===e.contribute&&(e.contribute=1),void 0===e.colorGradingMap&&(e.colorGradingMap=null)}function b(){return{enabled:!1,material:null,sharpness:.8}}function f(e){void 0===e.enabled&&(e.enabled=!1),void 0===e.material&&(e.material=null),void 0===e.sharpness&&(e.sharpness=.8)}function m(){return{enabled:!1,material:null}}function p(e){void 0===e.enabled&&(e.enabled=!1),void 0===e.material&&(e.material=null)}function h(){return{material:null}}function g(e){void 0===e.material&&(e.material=null)}a._RF.pop()}}}));
- System.register("chunks:///_virtual/builtin-pipeline.ts",["./rollupPluginModLoBabelHelpers.js","cc","./env","./builtin-pipeline-types.ts"],(function(){var e,a,i,t,s,r,o,d,n,l,h,c,p,g,m,_,u,f;return{setters:[function(a){e=a.createForOfIteratorHelperLoose},function(e){a=e.cclegacy,i=e.geometry,t=e.gfx,s=e.renderer,r=e.rendering,o=e.Vec3,d=e.Vec4,n=e.Vec2,l=e.Material,h=e.PipelineEventType,c=e.assert,p=e.clamp,g=e.sys,m=e.pipeline,_=e.Layers},function(e){u=e.DEBUG},function(e){f=e.makePipelineSettings}],execute:function(){a._RF.push({},"ff9b0GZzgRM/obMbHGfCNbk","builtin-pipeline",void 0);var S=i.AABB,T=i.Sphere,R=i.intersect,b=t.ClearFlagBit,P=t.Color,w=t.Format,C=t.FormatFeatureBit,E=t.LoadOp,M=t.StoreOp,x=t.TextureType,A=t.Viewport,L=s.scene,D=L.CameraUsage,v=L.CSMLevel,F=L.LightType;function O(e){return!!(e.clearFlag&(b.COLOR|b.STENCIL<<1))}function N(e,a,i,t,s,r){e.shadowFixedArea||e.csmLevel===v.LEVEL_1?(s.left=0,s.top=0,s.width=Math.trunc(a),s.height=Math.trunc(i)):(s.left=Math.trunc(t%2*.5*a),s.top=r>0?Math.trunc(.5*(1-Math.floor(t/2))*i):Math.trunc(.5*Math.floor(t/2)*i),s.width=Math.trunc(.5*a),s.height=Math.trunc(.5*i)),s.left=Math.max(0,s.left),s.top=Math.max(0,s.top),s.width=Math.max(1,s.width),s.height=Math.max(1,s.height)}var Q=function(){this.isWeb=!1,this.isWebGL1=!1,this.isWebGPU=!1,this.isMobile=!1,this.isHDR=!1,this.useFloatOutput=!1,this.toneMappingType=0,this.shadowEnabled=!1,this.shadowMapFormat=w.R32F,this.shadowMapSize=new n(1,1),this.usePlanarShadow=!1,this.screenSpaceSignY=1,this.supportDepthSample=!1,this.mobileMaxSpotLightShadowMaps=1,this.platform=new d(0,0,0,0)};function z(e,a){var i=C.SAMPLED_TEXTURE|C.LINEAR_FILTER,r=e.device;a.isWeb=!g.isNative,a.isWebGL1=r.gfxAPI===t.API.WEBGL,a.isWebGPU=r.gfxAPI===t.API.WEBGPU,a.isMobile=g.isMobile,a.isHDR=e.pipelineSceneData.isHDR,a.useFloatOutput=e.getMacroBool("CC_USE_FLOAT_OUTPUT"),a.toneMappingType=e.pipelineSceneData.postSettings.toneMappingType;var o=e.pipelineSceneData.shadows;a.shadowEnabled=o.enabled,a.shadowMapFormat=m.supportsR32FloatTexture(e.device)?w.R32F:w.RGBA8,a.shadowMapSize.set(o.size),a.usePlanarShadow=o.enabled&&o.type===s.scene.ShadowType.Planar,a.screenSpaceSignY=e.device.capabilities.screenSpaceSignY,a.supportDepthSample=(e.device.getFormatFeatures(w.DEPTH_STENCIL)&i)===i;var d=r.capabilities.screenSpaceSignY;a.platform.x=a.isMobile?1:0,a.platform.w=.5*d+.5<<1|.5*r.capabilities.clipSpaceSignY+.5}var B=f(),y=function(){this.colorName="",this.depthStencilName="",this.enableMainLightShadowMap=!1,this.enableMainLightPlanarShadowMap=!1,this.enablePostProcess=!1,this.enableProfiler=!1,this.enableShadingScale=!1,this.enableMSAA=!1,this.enableDOF=!1,this.enableBloom=!1,this.enableColorGrading=!1,this.enableFXAA=!1,this.enableFSR=!1,this.enableHDR=!1,this.enablePlanarReflectionProbe=!1,this.useFullPipeline=!1,this.singleForwardRadiancePass=!1,this.radianceFormat=t.Format.RGBA8,this.shadingScale=.5,this.settings=B};function G(e,a,i){i.enableDOF=e.supportDepthSample&&a.depthOfField.enabled&&!!a.depthOfField.material,i.enableBloom=a.bloom.enabled&&!!a.bloom.material,i.enableColorGrading=a.colorGrading.enabled&&!!a.colorGrading.material&&!!a.colorGrading.colorGradingMap,i.enableFXAA=a.fxaa.enabled&&!!a.fxaa.material,i.enablePostProcess=i.enableDOF||i.enableBloom||i.enableColorGrading||i.enableFXAA}function I(e,a,i){var s=e.window,o=e.cameraUsage===D.GAME&&!!s.swapchain,d=e.cameraUsage===D.SCENE_VIEW||e.cameraUsage===D.PREVIEW;if(i.colorName=s.colorName,i.depthStencilName=s.depthStencilName,i.useFullPipeline=0!=(e.visibility&_.Enum.DEFAULT),i.enableMainLightShadowMap=a.shadowEnabled&&!a.usePlanarShadow&&!!e.scene&&!!e.scene.mainLight&&e.scene.mainLight.shadowEnabled,i.enableMainLightPlanarShadowMap=a.shadowEnabled&&a.usePlanarShadow&&!!e.scene&&!!e.scene.mainLight&&e.scene.mainLight.shadowEnabled,i.enablePlanarReflectionProbe=o||e.cameraUsage===D.SCENE_VIEW,i.enableProfiler=u,i.settings=e.pipelineSettings?e.pipelineSettings:B,G(a,i.settings,i),d){var n=r.getEditorPipelineSettings();n&&(i.settings=n,G(a,i.settings,i))}i.enableMSAA=i.settings.msaa.enabled&&!a.isWeb&&!a.isWebGL1,i.shadingScale=i.settings.shadingScale,i.enableShadingScale=i.settings.enableShadingScale&&1!==i.shadingScale,i.enableFSR=i.settings.fsr.enabled&&!!i.settings.fsr.material&&i.enableShadingScale&&i.shadingScale<1,i.singleForwardRadiancePass=a.isMobile||i.enableMSAA,i.enableHDR=i.useFullPipeline&&a.useFloatOutput,i.radianceFormat=i.enableHDR?t.Format.RGBA16F:t.Format.RGBA8}if(r){var H=r.QueueHint,V=r.SceneFlags,U=r.ResourceFlags,k=r.ResourceResidency,W=function(){function a(){this.lights=[],this.shadowEnabledSpotLights=[],this._sphere=T.create(0,0,0,1),this._boundingBox=new S,this._rangedDirLightBoundingBox=new S(0,0,0,.5,.5,.5)}var i=a.prototype;return i.cullLights=function(a,i,t){this.lights.length=0,this.shadowEnabledSpotLights.length=0;for(var s,r=e(a.spotLights);!(s=r()).done;){var d=s.value;d.baked||(T.set(this._sphere,d.position.x,d.position.y,d.position.z,d.range),R.sphereFrustum(this._sphere,i)&&(d.shadowEnabled?this.shadowEnabledSpotLights.push(d):this.lights.push(d)))}for(var n,l=e(a.sphereLights);!(n=l()).done;){var h=n.value;h.baked||(T.set(this._sphere,h.position.x,h.position.y,h.position.z,h.range),R.sphereFrustum(this._sphere,i)&&this.lights.push(h))}for(var c,p=e(a.pointLights);!(c=p()).done;){var g=c.value;g.baked||(T.set(this._sphere,g.position.x,g.position.y,g.position.z,g.range),R.sphereFrustum(this._sphere,i)&&this.lights.push(g))}for(var m,_=e(a.rangedDirLights);!(m=_()).done;){var u=m.value;S.transform(this._boundingBox,this._rangedDirLightBoundingBox,u.node.getWorldMatrix()),R.aabbFrustum(this._boundingBox,i)&&this.lights.push(u)}t&&this.shadowEnabledSpotLights.sort((function(e,a){return o.squaredDistance(t,e.position)-o.squaredDistance(t,a.position)}))},i._addLightQueues=function(a,i){for(var t,s=e(this.lights);!(t=s()).done;){var r=t.value,o=i.addQueue(H.BLEND,"forward-add");switch(r.type){case F.SPHERE:o.name="sphere-light";break;case F.SPOT:o.name="spot-light";break;case F.POINT:o.name="point-light";break;case F.RANGED_DIRECTIONAL:o.name="ranged-directional-light";break;default:o.name="unknown-light"}o.addScene(a,V.BLEND,r)}},i.addSpotlightShadowPasses=function(a,i,t){for(var s,r=0,o=e(this.shadowEnabledSpotLights);!(s=o()).done;){var d=s.value,n=a.pipelineSceneData.shadows.size,l=a.addRenderPass(n.x,n.y,"default");if(l.name="SpotLightShadowPass"+r,l.addRenderTarget("SpotShadowMap"+r,E.CLEAR,M.STORE,new P(1,1,1,1)),l.addDepthStencil("SpotShadowDepth"+r,E.CLEAR,M.DISCARD),l.addQueue(H.NONE,"shadow-caster").addScene(i,V.OPAQUE|V.MASK|V.SHADOW_CASTER).useLightFrustum(d),++r>=t)break}},i.addLightQueues=function(a,i,t){this._addLightQueues(i,a);for(var s,r=0,o=e(this.shadowEnabledSpotLights);!(s=o()).done;){var d=s.value;if(a.addTexture("SpotShadowMap"+r,"cc_spotShadowMap"),a.addQueue(H.BLEND,"forward-add").addScene(i,V.BLEND,d),++r>=t)break}},i.addLightPasses=function(a,i,t,s,r,o,d,n,l,h){this._addLightQueues(d,h);for(var c,p=0,g=l.pipelineSceneData.shadows.size,m=e(this.shadowEnabledSpotLights);!(c=m()).done;){var _=c.value,u=l.addRenderPass(g.x,g.y,"default");u.name="SpotlightShadowPass",u.addRenderTarget("ShadowMap"+s,E.CLEAR,M.STORE,new P(1,1,1,1)),u.addDepthStencil("ShadowDepth"+s,E.CLEAR,M.DISCARD),u.addQueue(H.NONE,"shadow-caster").addScene(d,V.OPAQUE|V.MASK|V.SHADOW_CASTER).useLightFrustum(_);var f=++p===this.shadowEnabledSpotLights.length?t:M.STORE;(h=l.addRenderPass(r,o,"default")).name="SpotlightWithShadowMap",h.setViewport(n),h.addRenderTarget(a,E.LOAD),h.addDepthStencil(i,E.LOAD,f),h.addTexture("ShadowMap"+s,"cc_spotShadowMap"),h.addQueue(H.BLEND,"forward-add").addScene(d,V.BLEND,_)}return h},i.isMultipleLightPassesNeeded=function(){return this.shadowEnabledSpotLights.length>0},a}(),Y=function(){function i(){this._pipelineEvent=a.director.root.pipelineEvent,this._clearColor=new P(0,0,0,1),this._clearColorTransparentBlack=new P(0,0,0,0),this._reflectionProbeClearColor=new o(0,0,0),this._viewport=new A,this._configs=new Q,this._cameraConfigs=new y,this._cocParams=new d(0,0,0,0),this._cocTexSize=new d(0,0,0,0),this._bloomParams=new d(0,0,0,0),this._bloomTexSize=new d(0,0,0,0),this._bloomWidths=[],this._bloomHeights=[],this._bloomTexNames=[],this._colorGradingTexSize=new n(0,0),this._fxaaParams=new d(0,0,0,0),this._fsrParams=new d(0,0,0,0),this._fsrTexSize=new d(0,0,0,0),this._copyAndTonemapMaterial=new l,this._initialized=!1,this.forwardLighting=new W}var g=i.prototype;return g.windowResize=function(e,a,i,t,s){z(e,this._configs),I(i,this._configs,this._cameraConfigs);var r=this._cameraConfigs.settings,o=a.renderWindowId,d=this._cameraConfigs.enableShadingScale?Math.max(Math.floor(t*this._cameraConfigs.shadingScale),1):t,n=this._cameraConfigs.enableShadingScale?Math.max(Math.floor(s*this._cameraConfigs.shadingScale),1):s;if(e.addRenderWindow(this._cameraConfigs.colorName,w.RGBA8,t,s,a,this._cameraConfigs.depthStencilName),this._cameraConfigs.enableShadingScale?(e.addDepthStencil("ScaledSceneDepth"+o,w.DEPTH_STENCIL,d,n),e.addRenderTarget("ScaledRadiance"+o,this._cameraConfigs.radianceFormat,d,n),e.addRenderTarget("ScaledLdrColor"+o,w.RGBA8,d,n)):(e.addDepthStencil("SceneDepth"+o,w.DEPTH_STENCIL,d,n),e.addRenderTarget("Radiance"+o,this._cameraConfigs.radianceFormat,d,n),e.addRenderTarget("LdrColor"+o,w.RGBA8,d,n)),this._cameraConfigs.enableFSR&&e.addRenderTarget("FsrColor"+o,w.RGBA8,t,s),this._cameraConfigs.enableMSAA&&(this._cameraConfigs.enableHDR?e.addTexture("MsaaRadiance"+o,x.TEX2D,this._cameraConfigs.radianceFormat,d,n,1,1,1,r.msaa.sampleCount,U.COLOR_ATTACHMENT,k.MEMORYLESS):e.addTexture("MsaaRadiance"+o,x.TEX2D,w.RGBA8,d,n,1,1,1,r.msaa.sampleCount,U.COLOR_ATTACHMENT,k.MEMORYLESS),e.addTexture("MsaaDepthStencil"+o,x.TEX2D,w.DEPTH_STENCIL,d,n,1,1,1,r.msaa.sampleCount,U.DEPTH_STENCIL_ATTACHMENT,k.MEMORYLESS)),e.addRenderTarget("ShadowMap"+o,this._configs.shadowMapFormat,this._configs.shadowMapSize.x,this._configs.shadowMapSize.y),e.addDepthStencil("ShadowDepth"+o,w.DEPTH_STENCIL,this._configs.shadowMapSize.x,this._configs.shadowMapSize.y),this._cameraConfigs.singleForwardRadiancePass)for(var l=this._configs.mobileMaxSpotLightShadowMaps,h=0;h!==l;++h)e.addRenderTarget("SpotShadowMap"+h,this._configs.shadowMapFormat,this._configs.shadowMapSize.x,this._configs.shadowMapSize.y),e.addDepthStencil("SpotShadowDepth"+h,w.DEPTH_STENCIL,this._configs.shadowMapSize.x,this._configs.shadowMapSize.y);if(this._cameraConfigs.enableDOF){var c=Math.max(Math.floor(d/2),1),p=Math.max(Math.floor(n/2),1);e.addRenderTarget("DofRadiance"+o,this._cameraConfigs.radianceFormat,d,n),e.addRenderTarget("DofPrefilter"+o,this._cameraConfigs.radianceFormat,c,p),e.addRenderTarget("DofBokeh"+o,this._cameraConfigs.radianceFormat,c,p),e.addRenderTarget("DofFilter"+o,this._cameraConfigs.radianceFormat,c,p)}if(this._cameraConfigs.enableBloom)for(var g=d,m=n,_=0;_!==r.bloom.iterations+1;++_)g=Math.max(Math.floor(g/2),1),m=Math.max(Math.floor(m/2),1),e.addRenderTarget("BloomTex"+o+"_"+_,this._cameraConfigs.radianceFormat,g,m);this._cameraConfigs.enableColorGrading&&r.colorGrading.material&&r.colorGrading.colorGradingMap&&r.colorGrading.material.setProperty("colorGradingMap",r.colorGrading.colorGradingMap),this._cameraConfigs.enableFXAA&&this._cameraConfigs.enableShadingScale&&e.addRenderTarget("AaColor"+o,w.RGBA8,d,n)},g.setup=function(a,i){if(!this._initMaterials(i))for(var t,s=e(a);!(t=s()).done;){var r=t.value;r.scene&&r.window&&(I(r,this._configs,this._cameraConfigs),this._pipelineEvent.emit(h.RENDER_CAMERA_BEGIN,r),this._cameraConfigs.useFullPipeline?this._buildForwardPipeline(i,r,r.scene):this._buildSimplePipeline(i,r),this._pipelineEvent.emit(h.RENDER_CAMERA_END,r))}},g._buildSimplePipeline=function(e,a){var i=Math.max(Math.floor(a.window.width),1),t=Math.max(Math.floor(a.window.height),1),s=this._cameraConfigs.colorName,r=this._cameraConfigs.depthStencilName,o=a.viewport;this._viewport.left=Math.round(o.x*i),this._viewport.top=Math.round(o.y*t),this._viewport.width=Math.max(Math.round(o.width*i),1),this._viewport.height=Math.max(Math.round(o.height*t),1);var d=a.clearColor;this._clearColor.x=d.x,this._clearColor.y=d.y,this._clearColor.z=d.z,this._clearColor.w=d.w;var n=e.addRenderPass(i,t,"default");O(a)?n.addRenderTarget(s,E.CLEAR,M.STORE,this._clearColor):n.addRenderTarget(s,E.LOAD,M.STORE),a.clearFlag&b.DEPTH_STENCIL?n.addDepthStencil(r,E.CLEAR,M.DISCARD,a.clearDepth,a.clearStencil,a.clearFlag&b.DEPTH_STENCIL):n.addDepthStencil(r,E.LOAD,M.DISCARD),n.setViewport(this._viewport),n.addQueue(H.OPAQUE).addScene(a,V.OPAQUE);var l=V.BLEND|V.UI;this._cameraConfigs.enableProfiler&&(l|=V.PROFILER,n.showStatistics=!0),n.addQueue(H.BLEND).addScene(a,l)},g._buildForwardPipeline=function(e,a,i){var t,s=this._cameraConfigs.settings,r=Math.max(Math.floor(a.window.width),1),o=Math.max(Math.floor(a.window.height),1),d=this._cameraConfigs.enableShadingScale?Math.max(Math.floor(r*this._cameraConfigs.shadingScale),1):r,n=this._cameraConfigs.enableShadingScale?Math.max(Math.floor(o*this._cameraConfigs.shadingScale),1):o,l=a.window.renderWindowId,h=this._cameraConfigs.colorName,p=this._cameraConfigs.enableShadingScale?"ScaledSceneDepth"+l:"SceneDepth"+l,g=this._cameraConfigs.enableShadingScale?"ScaledRadiance"+l:"Radiance"+l,m=this._cameraConfigs.enableShadingScale?"ScaledLdrColor"+l:"LdrColor"+l,_=i.mainLight;if(this.forwardLighting.cullLights(i,a.frustum),this._cameraConfigs.enableMainLightShadowMap&&(c(!!_),this._addCascadedShadowMapPass(e,l,_,a)),this._cameraConfigs.singleForwardRadiancePass&&this.forwardLighting.addSpotlightShadowPasses(e,a,this._configs.mobileMaxSpotLightShadowMaps),this._tryAddReflectionProbePasses(e,l,_,a.scene),this._cameraConfigs.enablePostProcess){if(this._cameraConfigs.enableDOF){c(!!s.depthOfField.material);var u="DofRadiance"+l;this._addForwardRadiancePasses(e,l,a,d,n,_,u,p,!0,M.STORE),this._addDepthOfFieldPasses(e,s,s.depthOfField.material,l,a,d,n,u,p,g,m)}else this._addForwardRadiancePasses(e,l,a,d,n,_,g,p);if(this._cameraConfigs.enableBloom&&(c(!!s.bloom.material),this._addKawaseDualFilterBloomPasses(e,s,s.bloom.material,l,d,n,g)),this._cameraConfigs.enableFXAA){c(!!s.fxaa.material);var f=this._cameraConfigs.enableHDR||this._cameraConfigs.enableColorGrading,S=f?m:g;if(f&&this._addCopyAndTonemapPass(e,s,d,n,g,S),this._cameraConfigs.enableShadingScale){var T="AaColor"+l;this._addFxaaPass(e,s.fxaa.material,d,n,S,T),t=this._cameraConfigs.enableFSR&&s.fsr.material?this._addFsrPass(e,s,s.fsr.material,l,d,n,T,r,o,h):this._addCopyPass(e,r,o,T,h)}else t=this._addFxaaPass(e,s.fxaa.material,r,o,S,h)}else t=this._addTonemapResizeOrSuperResolutionPasses(e,s,l,d,n,g,m,r,o,h)}else this._cameraConfigs.enableHDR||this._cameraConfigs.enableShadingScale?(this._addForwardRadiancePasses(e,l,a,d,n,_,g,p),t=this._addTonemapResizeOrSuperResolutionPasses(e,s,l,d,n,g,m,r,o,h)):t=this._addForwardRadiancePasses(e,l,a,r,o,_,h,this._cameraConfigs.depthStencilName);this._addUIQueue(a,t)},g._addTonemapResizeOrSuperResolutionPasses=function(e,a,i,t,s,r,o,d,n,l){var h;return this._cameraConfigs.enableFSR&&a.fsr.material?(this._addCopyAndTonemapPass(e,a,t,s,r,o),h=this._addFsrPass(e,a,a.fsr.material,i,t,s,o,d,n,l)):h=this._addCopyAndTonemapPass(e,a,d,n,r,l),h},g._addCascadedShadowMapPass=function(e,a,i,t){var s=e.pipelineSceneData.shadows.size.x,r=e.pipelineSceneData.shadows.size.y;this._viewport.left=0,this._viewport.top=0,this._viewport.width=s,this._viewport.height=r;var o=e.addRenderPass(s,r,"default");o.name="CascadedShadowMap",o.addRenderTarget("ShadowMap"+a,E.CLEAR,M.STORE,new P(1,1,1,1)),o.addDepthStencil("ShadowDepth"+a,E.CLEAR,M.DISCARD);for(var d=e.pipelineSceneData.csmSupported?i.csmLevel:1,n=0;n!==d;++n){N(i,s,r,n,this._viewport,this._configs.screenSpaceSignY);var l=o.addQueue(H.NONE,"shadow-caster");this._configs.isWebGPU||l.setViewport(this._viewport),l.addScene(t,V.OPAQUE|V.MASK|V.SHADOW_CASTER).useLightFrustum(i,n)}},g._addCopyPass=function(e,a,i,t,s){var r=e.addRenderPass(a,i,"cc-tone-mapping");return r.addRenderTarget(s,E.CLEAR,M.STORE,this._clearColorTransparentBlack),r.addTexture(t,"inputTexture"),r.setVec4("g_platform",this._configs.platform),r.addQueue(H.OPAQUE).addFullscreenQuad(this._copyAndTonemapMaterial,1),r},g._addCopyAndTonemapPass=function(e,a,i,t,s,r){var o;if(this._cameraConfigs.enableColorGrading&&a.colorGrading.material&&a.colorGrading.colorGradingMap){var d=a.colorGrading.colorGradingMap;this._colorGradingTexSize.x=d.width,this._colorGradingTexSize.y=d.height;var n=d.width===d.height;(o=n?e.addRenderPass(i,t,"cc-color-grading-8x8"):e.addRenderPass(i,t,"cc-color-grading-nx1")).addRenderTarget(r,E.CLEAR,M.STORE,this._clearColorTransparentBlack),o.addTexture(s,"sceneColorMap"),o.setVec4("g_platform",this._configs.platform),o.setVec2("lutTextureSize",this._colorGradingTexSize),o.setFloat("contribute",a.colorGrading.contribute),o.addQueue(H.OPAQUE).addFullscreenQuad(a.colorGrading.material,n?1:0)}else(o=e.addRenderPass(i,t,"cc-tone-mapping")).addRenderTarget(r,E.CLEAR,M.STORE,this._clearColorTransparentBlack),o.addTexture(s,"inputTexture"),o.setVec4("g_platform",this._configs.platform),a.toneMapping.material?o.addQueue(H.OPAQUE).addFullscreenQuad(a.toneMapping.material,0):o.addQueue(H.OPAQUE).addFullscreenQuad(this._copyAndTonemapMaterial,0);return o},g._buildForwardMainLightPass=function(e,a,i,t,s,r,o,d){void 0===d&&(d=null),e.setViewport(this._viewport);var n=this._cameraConfigs.enableMSAA?M.DISCARD:M.STORE;O(i)?e.addRenderTarget(t,E.CLEAR,n,this._clearColor):e.addRenderTarget(t,E.LOAD,n),i.clearFlag&b.DEPTH_STENCIL?e.addDepthStencil(s,E.CLEAR,r,i.clearDepth,i.clearStencil,i.clearFlag&b.DEPTH_STENCIL):e.addDepthStencil(s,E.LOAD,r),this._cameraConfigs.enableMainLightShadowMap&&e.addTexture("ShadowMap"+a,"cc_shadowMap"),e.addQueue(H.NONE).addScene(i,V.OPAQUE|V.MASK,o||void 0,d||void 0)},g._addDepthOfFieldPasses=function(e,a,i,t,s,r,o,d,n,l,h){this._cocParams.x=a.depthOfField.focusDistance,this._cocParams.y=a.depthOfField.focusRange,this._cocParams.z=a.depthOfField.bokehRadius,this._cocParams.w=0,this._cocTexSize.x=1/r,this._cocTexSize.y=1/o,this._cocTexSize.z=r,this._cocTexSize.w=o;var c=Math.max(Math.floor(r/2),1),p=Math.max(Math.floor(o/2),1),g=h,m="DofPrefilter"+t,_="DofBokeh"+t,u="DofFilter"+t,f=e.addRenderPass(r,o,"cc-dof-coc");f.addRenderTarget(g,E.CLEAR,M.STORE,this._clearColorTransparentBlack),f.addTexture(n,"DepthTex"),f.setVec4("g_platform",this._configs.platform),f.setMat4("proj",s.matProj),f.setVec4("cocParams",this._cocParams),f.addQueue(H.OPAQUE).addCameraQuad(s,i,0);var S=e.addRenderPass(c,p,"cc-dof-prefilter");S.addRenderTarget(m,E.CLEAR,M.STORE,this._clearColorTransparentBlack),S.addTexture(d,"colorTex"),S.addTexture(g,"cocTex"),S.setVec4("g_platform",this._configs.platform),S.setVec4("mainTexTexelSize",this._cocTexSize),S.addQueue(H.OPAQUE).addFullscreenQuad(i,1);var T=e.addRenderPass(c,p,"cc-dof-bokeh");T.addRenderTarget(_,E.CLEAR,M.STORE,this._clearColorTransparentBlack),T.addTexture(m,"prefilterTex"),T.setVec4("g_platform",this._configs.platform),T.setVec4("mainTexTexelSize",this._cocTexSize),T.setVec4("cocParams",this._cocParams),T.addQueue(H.OPAQUE).addFullscreenQuad(i,2);var R=e.addRenderPass(c,p,"cc-dof-filter");R.addRenderTarget(u,E.CLEAR,M.STORE,this._clearColorTransparentBlack),R.addTexture(_,"bokehTex"),R.setVec4("g_platform",this._configs.platform),R.setVec4("mainTexTexelSize",this._cocTexSize),R.addQueue(H.OPAQUE).addFullscreenQuad(i,3);var b=e.addRenderPass(r,o,"cc-dof-combine");b.addRenderTarget(l,E.CLEAR,M.STORE,this._clearColorTransparentBlack),b.addTexture(d,"colorTex"),b.addTexture(g,"cocTex"),b.addTexture(u,"filterTex"),b.setVec4("g_platform",this._configs.platform),b.setVec4("cocParams",this._cocParams),b.addQueue(H.OPAQUE).addFullscreenQuad(i,4)},g._addKawaseDualFilterBloomPasses=function(e,a,i,t,s,r,o){var d=a.bloom.iterations,n=d+1;this._bloomWidths.length=n,this._bloomHeights.length=n,this._bloomWidths[0]=Math.max(Math.floor(s/2),1),this._bloomHeights[0]=Math.max(Math.floor(r/2),1);for(var l=1;l!==n;++l)this._bloomWidths[l]=Math.max(Math.floor(this._bloomWidths[l-1]/2),1),this._bloomHeights[l]=Math.max(Math.floor(this._bloomHeights[l-1]/2),1);this._bloomTexNames.length=n;for(var h=0;h!==n;++h)this._bloomTexNames[h]="BloomTex"+t+"_"+h;this._bloomParams.x=this._configs.useFloatOutput?1:0,this._bloomParams.x=0,this._bloomParams.z=a.bloom.threshold,this._bloomParams.w=a.bloom.enableAlphaMask?1:0;var c=e.addRenderPass(this._bloomWidths[0],this._bloomHeights[0],"cc-bloom-prefilter");c.addRenderTarget(this._bloomTexNames[0],E.CLEAR,M.STORE,this._clearColorTransparentBlack),c.addTexture(o,"inputTexture"),c.setVec4("g_platform",this._configs.platform),c.setVec4("bloomParams",this._bloomParams),c.addQueue(H.OPAQUE).addFullscreenQuad(i,0);for(var p=1;p!==n;++p){var g=e.addRenderPass(this._bloomWidths[p],this._bloomHeights[p],"cc-bloom-downsample");g.addRenderTarget(this._bloomTexNames[p],E.CLEAR,M.STORE,this._clearColorTransparentBlack),g.addTexture(this._bloomTexNames[p-1],"bloomTexture"),this._bloomTexSize.x=this._bloomWidths[p-1],this._bloomTexSize.y=this._bloomHeights[p-1],g.setVec4("g_platform",this._configs.platform),g.setVec4("bloomTexSize",this._bloomTexSize),g.addQueue(H.OPAQUE).addFullscreenQuad(i,1)}for(var m=d;m-- >0;){var _=e.addRenderPass(this._bloomWidths[m],this._bloomHeights[m],"cc-bloom-upsample");_.addRenderTarget(this._bloomTexNames[m],E.CLEAR,M.STORE,this._clearColorTransparentBlack),_.addTexture(this._bloomTexNames[m+1],"bloomTexture"),this._bloomTexSize.x=this._bloomWidths[m+1],this._bloomTexSize.y=this._bloomHeights[m+1],_.setVec4("g_platform",this._configs.platform),_.setVec4("bloomTexSize",this._bloomTexSize),_.addQueue(H.OPAQUE).addFullscreenQuad(i,2)}var u=e.addRenderPass(s,r,"cc-bloom-combine");u.addRenderTarget(o,E.LOAD,M.STORE),u.addTexture(this._bloomTexNames[0],"bloomTexture"),u.setVec4("g_platform",this._configs.platform),u.setVec4("bloomParams",this._bloomParams),u.addQueue(H.BLEND).addFullscreenQuad(i,3)},g._addFsrPass=function(e,a,i,t,s,r,o,d,n,l){this._fsrTexSize.x=s,this._fsrTexSize.y=r,this._fsrTexSize.z=d,this._fsrTexSize.w=n,this._fsrParams.x=p(1-a.fsr.sharpness,.02,.98);var h="FsrColor"+t,c=e.addRenderPass(d,n,"cc-fsr-easu");c.addRenderTarget(h,E.CLEAR,M.STORE,this._clearColorTransparentBlack),c.addTexture(o,"outputResultMap"),c.setVec4("g_platform",this._configs.platform),c.setVec4("fsrTexSize",this._fsrTexSize),c.addQueue(H.OPAQUE).addFullscreenQuad(i,0);var g=e.addRenderPass(d,n,"cc-fsr-rcas");return g.addRenderTarget(l,E.CLEAR,M.STORE,this._clearColorTransparentBlack),g.addTexture(h,"outputResultMap"),g.setVec4("g_platform",this._configs.platform),g.setVec4("fsrTexSize",this._fsrTexSize),g.setVec4("fsrParams",this._fsrParams),g.addQueue(H.OPAQUE).addFullscreenQuad(i,1),g},g._addFxaaPass=function(e,a,i,t,s,r){this._fxaaParams.x=i,this._fxaaParams.y=t,this._fxaaParams.z=1/i,this._fxaaParams.w=1/t;var o=e.addRenderPass(i,t,"cc-fxaa");return o.addRenderTarget(r,E.CLEAR,M.STORE,this._clearColorTransparentBlack),o.addTexture(s,"sceneColorMap"),o.setVec4("g_platform",this._configs.platform),o.setVec4("texSize",this._fxaaParams),o.addQueue(H.OPAQUE).addFullscreenQuad(a,0),o},g._addUIQueue=function(e,a){var i=V.UI;this._cameraConfigs.enableProfiler&&(i|=V.PROFILER,a.showStatistics=!0),a.addQueue(H.BLEND,"default","default").addScene(e,i)},g._addForwardRadiancePasses=function(e,a,i,t,s,r,o,d,n,l){void 0===n&&(n=!1),void 0===l&&(l=M.DISCARD);var h=i.clearColor;this._clearColor.x=h.x,this._clearColor.y=h.y,this._clearColor.z=h.z,this._clearColor.w=h.w;var p=i.viewport;this._viewport.left=Math.round(p.x*t),this._viewport.top=Math.round(p.y*s),this._viewport.width=Math.max(Math.round(p.width*t),1),this._viewport.height=Math.max(Math.round(p.height*s),1);var g=!n&&this._cameraConfigs.enableMSAA;c(!g||this._cameraConfigs.singleForwardRadiancePass);var m=this._cameraConfigs.singleForwardRadiancePass?this._addForwardSingleRadiancePass(e,a,i,g,t,s,r,o,d,l):this._addForwardMultipleRadiancePasses(e,a,i,t,s,r,o,d,l);this._cameraConfigs.enableMainLightPlanarShadowMap&&this.addPlanarShadowQueue(i,r,m);var _=V.BLEND|(i.geometryRenderer?V.GEOMETRY:V.NONE);return m.addQueue(H.BLEND).addScene(i,_,r||void 0),m},g._addForwardSingleRadiancePass=function(e,a,i,t,s,r,o,d,n,l){var h;if(c(this._cameraConfigs.singleForwardRadiancePass),t){var p="MsaaRadiance"+a,g="MsaaDepthStencil"+a,m=this._cameraConfigs.settings.msaa.sampleCount,_=e.addMultisampleRenderPass(s,r,m,0,"default");_.name="MsaaForwardPass",this._buildForwardMainLightPass(_,a,i,p,g,M.DISCARD,o),_.resolveRenderTarget(p,d),h=_}else(h=e.addRenderPass(s,r,"default")).name="ForwardPass",this._buildForwardMainLightPass(h,a,i,d,n,l,o);return c(void 0!==h),this.forwardLighting.addLightQueues(h,i,this._configs.mobileMaxSpotLightShadowMaps),h},g.addPlanarShadowQueue=function(e,a,i){i.addQueue(H.BLEND,"planar-shadow").addScene(e,V.SHADOW_CASTER|V.PLANAR_SHADOW|V.BLEND,a||void 0)},g._addForwardMultipleRadiancePasses=function(e,a,i,t,s,r,o,d,n){c(!this._cameraConfigs.singleForwardRadiancePass);var l=e.addRenderPass(t,s,"default");l.name="ForwardPass";var h=this.forwardLighting.isMultipleLightPassesNeeded()?M.STORE:n;return this._buildForwardMainLightPass(l,a,i,o,d,h,r),l=this.forwardLighting.addLightPasses(o,d,n,a,t,s,i,this._viewport,e,l)},g._buildReflectionProbePass=function(e,a,i,t,s,o,d){void 0===d&&(d=null);var n=this._cameraConfigs.enableMSAA?M.DISCARD:M.STORE;if(O(i)){this._reflectionProbeClearColor.x=i.clearColor.x,this._reflectionProbeClearColor.y=i.clearColor.y,this._reflectionProbeClearColor.z=i.clearColor.z;var l=r.packRGBE(this._reflectionProbeClearColor);this._clearColor.x=l.x,this._clearColor.y=l.y,this._clearColor.z=l.z,this._clearColor.w=l.w,e.addRenderTarget(t,E.CLEAR,n,this._clearColor)}else e.addRenderTarget(t,E.LOAD,n);i.clearFlag&b.DEPTH_STENCIL?e.addDepthStencil(s,E.CLEAR,M.DISCARD,i.clearDepth,i.clearStencil,i.clearFlag&b.DEPTH_STENCIL):e.addDepthStencil(s,E.LOAD,M.DISCARD),this._cameraConfigs.enableMainLightShadowMap&&e.addTexture("ShadowMap"+a,"cc_shadowMap"),e.addQueue(H.NONE,"reflect-map").addScene(i,V.OPAQUE|V.MASK|V.REFLECTION_PROBE,o||void 0,d||void 0)},g._tryAddReflectionProbePasses=function(i,r,o,d){var n=a.internal.reflectionProbeManager;if(n)for(var l,h=n.getProbes(),c=0,p=e(h);!(l=p()).done;){var g=l.value;if(g.needRender){var m=g.renderArea(),_=Math.max(Math.floor(m.x),1),u=Math.max(Math.floor(m.y),1);if(g.probeType===s.scene.ProbeType.PLANAR){if(!this._cameraConfigs.enablePlanarReflectionProbe)continue;var f=g.realtimePlanarTexture.window,S="PlanarProbeRT"+c,T="PlanarProbeDS"+c;i.addRenderWindow(S,this._cameraConfigs.radianceFormat,_,u,f),i.addDepthStencil(T,t.Format.DEPTH_STENCIL,_,u,k.MEMORYLESS);var R=i.addRenderPass(_,u,"default");R.name="PlanarReflectionProbe"+c,this._buildReflectionProbePass(R,r,g.camera,S,T,o,d)}if(4===++c)break}}},g._initMaterials=function(e){return this._initialized?0:(z(e,this._configs),this._copyAndTonemapMaterial._uuid="builtin-pipeline-tone-mapping-material",this._copyAndTonemapMaterial.initialize({effectName:"pipeline/post-process/tone-mapping"}),this._copyAndTonemapMaterial.effectAsset&&(this._initialized=!0),this._initialized?0:1)},i}();r.setCustomPipeline("Builtin",new Y)}a._RF.pop()}}}));
- System.register("chunks:///_virtual/internal",["./builtin-pipeline-settings.ts","./builtin-pipeline-types.ts","./builtin-pipeline.ts"],(function(){return{setters:[null,null,null],execute:function(){}}}));
- (function(r) {
- r('virtual:///prerequisite-imports/internal', 'chunks:///_virtual/internal');
- })(function(mid, cid) {
- System.register(mid, [cid], function (_export, _context) {
- return {
- setters: [function(_m) {
- var _exportObj = {};
- for (var _key in _m) {
- if (_key !== "default" && _key !== "__esModule") _exportObj[_key] = _m[_key];
- }
-
- _export(_exportObj);
- }],
- execute: function () { }
- };
- });
- });
|