1 |
- {"ast":null,"code":"import { backbufferDepthStencilTextureHandle } from \"../../frameGraphTypes.js\";\nimport { Color4 } from \"../../../Maths/math.color.js\";\nimport { MaterialHelperGeometryRendering } from \"../../../Materials/materialHelper.geometryrendering.js\";\nimport { FrameGraphTask } from \"../../frameGraphTask.js\";\nimport { ObjectRenderer } from \"../../../Rendering/objectRenderer.js\";\nconst clearColors = [new Color4(0, 0, 0, 0), new Color4(1, 1, 1, 1), new Color4(1e8, 1e8, 1e8, 1e8)];\n/**\n * Task used to render geometry to a set of textures.\n */\nexport class FrameGraphGeometryRendererTask extends FrameGraphTask {\n /**\n * Gets or sets the camera used for rendering.\n */\n get camera() {\n return this._camera;\n }\n set camera(camera) {\n this._camera = camera;\n this._renderer.activeCamera = this.camera;\n }\n /**\n * The object renderer used by the geometry renderer task.\n */\n get objectRenderer() {\n return this._renderer;\n }\n /**\n * Gets or sets the name of the task.\n */\n get name() {\n return this._name;\n }\n set name(value) {\n this._name = value;\n if (this._renderer) {\n this._renderer.name = value;\n }\n }\n /**\n * Constructs a new geometry renderer task.\n * @param name The name of the task.\n * @param frameGraph The frame graph the task belongs to.\n * @param scene The scene the frame graph is associated with.\n * @param options The options of the object renderer.\n */\n constructor(name, frameGraph, scene, options) {\n super(name, frameGraph);\n /**\n * Whether depth testing is enabled (default is true).\n */\n this.depthTest = true;\n /**\n * Whether depth writing is enabled (default is true).\n */\n this.depthWrite = true;\n /**\n * The size of the output textures (default is 100% of the back buffer texture size).\n */\n this.size = {\n width: 100,\n height: 100\n };\n /**\n * Whether the size is a percentage of the back buffer size (default is true).\n */\n this.sizeIsPercentage = true;\n /**\n * The number of samples to use for the output textures (default is 1).\n */\n this.samples = 1;\n /**\n * The list of texture descriptions used by the geometry renderer task.\n */\n this.textureDescriptions = [];\n this._scene = scene;\n this._engine = this._scene.getEngine();\n this._renderer = new ObjectRenderer(name, scene, options);\n this._renderer.renderSprites = false;\n this._renderer.renderParticles = false;\n this._renderer.onBeforeRenderingManagerRenderObservable.add(() => {\n if (!this._renderer.options.doNotChangeAspectRatio) {\n scene.updateTransformMatrix(true);\n }\n });\n this.name = name;\n this._clearAttachmentsLayout = new Map();\n this._allAttachmentsLayout = [];\n this.outputDepthTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryViewDepthTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryScreenDepthTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryViewNormalTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryWorldNormalTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryLocalPositionTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryWorldPositionTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryAlbedoTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryReflectivityTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryVelocityTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryLinearVelocityTexture = this._frameGraph.textureManager.createDanglingHandle();\n }\n /**\n * Gets the list of excluded meshes from the velocity texture.\n */\n get excludedSkinnedMeshFromVelocityTexture() {\n return MaterialHelperGeometryRendering.GetConfiguration(this._renderer.renderPassId).excludedSkinnedMesh;\n }\n isReady() {\n return this._renderer.isReadyForRendering(this._textureWidth, this._textureHeight);\n }\n record() {\n if (this.textureDescriptions.length === 0 || this.objectList === undefined) {\n throw new Error(`FrameGraphGeometryRendererTask ${this.name}: object list and at least one geometry texture description must be provided`);\n }\n const outputTextureHandle = this._createMultiRenderTargetTexture();\n const depthEnabled = this._checkDepthTextureCompatibility();\n this._buildClearAttachmentsLayout();\n this._registerForRenderPassId(this._renderer.renderPassId);\n const outputTextureDescription = this._frameGraph.textureManager.getTextureDescription(outputTextureHandle[0]);\n this._textureWidth = outputTextureDescription.size.width;\n this._textureHeight = outputTextureDescription.size.height;\n // Create pass\n MaterialHelperGeometryRendering.MarkAsDirty(this._renderer.renderPassId, this.objectList.meshes || this._scene.meshes);\n const pass = this._frameGraph.addRenderPass(this.name);\n pass.setRenderTarget(outputTextureHandle);\n for (let i = 0; i < this.textureDescriptions.length; i++) {\n const description = this.textureDescriptions[i];\n const handle = outputTextureHandle[i];\n const index = MaterialHelperGeometryRendering.GeometryTextureDescriptions.findIndex(f => f.type === description.type);\n const geometryDescription = MaterialHelperGeometryRendering.GeometryTextureDescriptions[index];\n switch (geometryDescription.type) {\n case 5:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryViewDepthTexture, handle);\n break;\n case 10:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryScreenDepthTexture, handle);\n break;\n case 6:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryViewNormalTexture, handle);\n break;\n case 8:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryWorldNormalTexture, handle);\n break;\n case 9:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryLocalPositionTexture, handle);\n break;\n case 1:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryWorldPositionTexture, handle);\n break;\n case 12:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryAlbedoTexture, handle);\n break;\n case 3:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryReflectivityTexture, handle);\n break;\n case 2:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryVelocityTexture, handle);\n break;\n case 11:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryLinearVelocityTexture, handle);\n break;\n }\n }\n pass.setRenderTargetDepth(this.depthTexture);\n pass.setExecuteFunc(context => {\n this._renderer.renderList = this.objectList.meshes;\n this._renderer.particleSystemList = this.objectList.particleSystems;\n context.setDepthStates(this.depthTest && depthEnabled, this.depthWrite && depthEnabled);\n this._clearAttachmentsLayout.forEach((layout, clearType) => {\n context.clearColorAttachments(clearColors[clearType], layout);\n });\n context.bindAttachments(this._allAttachmentsLayout);\n context.render(this._renderer, this._textureWidth, this._textureHeight);\n });\n }\n dispose() {\n MaterialHelperGeometryRendering.DeleteConfiguration(this._renderer.renderPassId);\n this._renderer.dispose();\n super.dispose();\n }\n _createMultiRenderTargetTexture() {\n const types = [];\n const formats = [];\n const labels = [];\n const useSRGBBuffers = [];\n for (let i = 0; i < this.textureDescriptions.length; i++) {\n const description = this.textureDescriptions[i];\n const index = MaterialHelperGeometryRendering.GeometryTextureDescriptions.findIndex(f => f.type === description.type);\n if (index === -1) {\n throw new Error(`FrameGraphGeometryRendererTask ${this.name}: unknown texture type ${description.type}`);\n }\n types[i] = description.textureType;\n formats[i] = description.textureFormat;\n labels[i] = MaterialHelperGeometryRendering.GeometryTextureDescriptions[index].name;\n useSRGBBuffers[i] = false;\n }\n const baseHandle = this._frameGraph.textureManager.createRenderTargetTexture(this.name, {\n size: this.size,\n sizeIsPercentage: this.sizeIsPercentage,\n options: {\n createMipMaps: false,\n samples: this.samples,\n types,\n formats,\n useSRGBBuffers,\n labels\n }\n });\n const handles = [];\n for (let i = 0; i < this.textureDescriptions.length; i++) {\n handles.push(baseHandle + i);\n }\n return handles;\n }\n _checkDepthTextureCompatibility() {\n let depthEnabled = false;\n if (this.depthTexture !== undefined) {\n if (this.depthTexture === backbufferDepthStencilTextureHandle) {\n throw new Error(`FrameGraphGeometryRendererTask ${this.name}: the depth/stencil back buffer is not allowed as a depth texture`);\n }\n const depthTextureDescription = this._frameGraph.textureManager.getTextureDescription(this.depthTexture);\n if (depthTextureDescription.options.samples !== this.samples) {\n throw new Error(`FrameGraphGeometryRendererTask ${this.name}: the depth texture and the output texture must have the same number of samples`);\n }\n this._frameGraph.textureManager.resolveDanglingHandle(this.outputDepthTexture, this.depthTexture);\n depthEnabled = true;\n }\n return depthEnabled;\n }\n _buildClearAttachmentsLayout() {\n const clearAttachmentsLayout = new Map();\n const allAttachmentsLayout = [];\n for (let i = 0; i < this.textureDescriptions.length; i++) {\n const description = this.textureDescriptions[i];\n const index = MaterialHelperGeometryRendering.GeometryTextureDescriptions.findIndex(f => f.type === description.type);\n const geometryDescription = MaterialHelperGeometryRendering.GeometryTextureDescriptions[index];\n let layout = clearAttachmentsLayout.get(geometryDescription.clearType);\n if (layout === undefined) {\n layout = [];\n clearAttachmentsLayout.set(geometryDescription.clearType, layout);\n for (let j = 0; j < i; j++) {\n layout[j] = false;\n }\n }\n clearAttachmentsLayout.forEach((layout, clearType) => {\n layout.push(clearType === geometryDescription.clearType);\n });\n allAttachmentsLayout.push(true);\n }\n this._clearAttachmentsLayout = new Map();\n clearAttachmentsLayout.forEach((layout, clearType) => {\n this._clearAttachmentsLayout.set(clearType, this._engine.buildTextureLayout(layout));\n });\n this._allAttachmentsLayout = this._engine.buildTextureLayout(allAttachmentsLayout);\n }\n _registerForRenderPassId(renderPassId) {\n const configuration = MaterialHelperGeometryRendering.CreateConfiguration(renderPassId);\n for (let i = 0; i < this.textureDescriptions.length; i++) {\n const description = this.textureDescriptions[i];\n const index = MaterialHelperGeometryRendering.GeometryTextureDescriptions.findIndex(f => f.type === description.type);\n const geometryDescription = MaterialHelperGeometryRendering.GeometryTextureDescriptions[index];\n configuration.defines[geometryDescription.defineIndex] = i;\n }\n }\n}","map":{"version":3,"names":["backbufferDepthStencilTextureHandle","Color4","MaterialHelperGeometryRendering","FrameGraphTask","ObjectRenderer","clearColors","FrameGraphGeometryRendererTask","camera","_camera","_renderer","activeCamera","objectRenderer","name","_name","value","constructor","frameGraph","scene","options","depthTest","depthWrite","size","width","height","sizeIsPercentage","samples","textureDescriptions","_scene","_engine","getEngine","renderSprites","renderParticles","onBeforeRenderingManagerRenderObservable","add","doNotChangeAspectRatio","updateTransformMatrix","_clearAttachmentsLayout","Map","_allAttachmentsLayout","outputDepthTexture","_frameGraph","textureManager","createDanglingHandle","geometryViewDepthTexture","geometryScreenDepthTexture","geometryViewNormalTexture","geometryWorldNormalTexture","geometryLocalPositionTexture","geometryWorldPositionTexture","geometryAlbedoTexture","geometryReflectivityTexture","geometryVelocityTexture","geometryLinearVelocityTexture","excludedSkinnedMeshFromVelocityTexture","GetConfiguration","renderPassId","excludedSkinnedMesh","isReady","isReadyForRendering","_textureWidth","_textureHeight","record","length","objectList","undefined","Error","outputTextureHandle","_createMultiRenderTargetTexture","depthEnabled","_checkDepthTextureCompatibility","_buildClearAttachmentsLayout","_registerForRenderPassId","outputTextureDescription","getTextureDescription","MarkAsDirty","meshes","pass","addRenderPass","setRenderTarget","i","description","handle","index","GeometryTextureDescriptions","findIndex","f","type","geometryDescription","resolveDanglingHandle","setRenderTargetDepth","depthTexture","setExecuteFunc","context","renderList","particleSystemList","particleSystems","setDepthStates","forEach","layout","clearType","clearColorAttachments","bindAttachments","render","dispose","DeleteConfiguration","types","formats","labels","useSRGBBuffers","textureType","textureFormat","baseHandle","createRenderTargetTexture","createMipMaps","handles","push","depthTextureDescription","clearAttachmentsLayout","allAttachmentsLayout","get","set","j","buildTextureLayout","configuration","CreateConfiguration","defines","defineIndex"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FrameGraph/Tasks/Rendering/geometryRendererTask.js"],"sourcesContent":["import { backbufferDepthStencilTextureHandle } from \"../../frameGraphTypes.js\";\nimport { Color4 } from \"../../../Maths/math.color.js\";\nimport { MaterialHelperGeometryRendering } from \"../../../Materials/materialHelper.geometryrendering.js\";\n\nimport { FrameGraphTask } from \"../../frameGraphTask.js\";\nimport { ObjectRenderer } from \"../../../Rendering/objectRenderer.js\";\nconst clearColors = [new Color4(0, 0, 0, 0), new Color4(1, 1, 1, 1), new Color4(1e8, 1e8, 1e8, 1e8)];\n/**\n * Task used to render geometry to a set of textures.\n */\nexport class FrameGraphGeometryRendererTask extends FrameGraphTask {\n /**\n * Gets or sets the camera used for rendering.\n */\n get camera() {\n return this._camera;\n }\n set camera(camera) {\n this._camera = camera;\n this._renderer.activeCamera = this.camera;\n }\n /**\n * The object renderer used by the geometry renderer task.\n */\n get objectRenderer() {\n return this._renderer;\n }\n /**\n * Gets or sets the name of the task.\n */\n get name() {\n return this._name;\n }\n set name(value) {\n this._name = value;\n if (this._renderer) {\n this._renderer.name = value;\n }\n }\n /**\n * Constructs a new geometry renderer task.\n * @param name The name of the task.\n * @param frameGraph The frame graph the task belongs to.\n * @param scene The scene the frame graph is associated with.\n * @param options The options of the object renderer.\n */\n constructor(name, frameGraph, scene, options) {\n super(name, frameGraph);\n /**\n * Whether depth testing is enabled (default is true).\n */\n this.depthTest = true;\n /**\n * Whether depth writing is enabled (default is true).\n */\n this.depthWrite = true;\n /**\n * The size of the output textures (default is 100% of the back buffer texture size).\n */\n this.size = { width: 100, height: 100 };\n /**\n * Whether the size is a percentage of the back buffer size (default is true).\n */\n this.sizeIsPercentage = true;\n /**\n * The number of samples to use for the output textures (default is 1).\n */\n this.samples = 1;\n /**\n * The list of texture descriptions used by the geometry renderer task.\n */\n this.textureDescriptions = [];\n this._scene = scene;\n this._engine = this._scene.getEngine();\n this._renderer = new ObjectRenderer(name, scene, options);\n this._renderer.renderSprites = false;\n this._renderer.renderParticles = false;\n this._renderer.onBeforeRenderingManagerRenderObservable.add(() => {\n if (!this._renderer.options.doNotChangeAspectRatio) {\n scene.updateTransformMatrix(true);\n }\n });\n this.name = name;\n this._clearAttachmentsLayout = new Map();\n this._allAttachmentsLayout = [];\n this.outputDepthTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryViewDepthTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryScreenDepthTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryViewNormalTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryWorldNormalTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryLocalPositionTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryWorldPositionTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryAlbedoTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryReflectivityTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryVelocityTexture = this._frameGraph.textureManager.createDanglingHandle();\n this.geometryLinearVelocityTexture = this._frameGraph.textureManager.createDanglingHandle();\n }\n /**\n * Gets the list of excluded meshes from the velocity texture.\n */\n get excludedSkinnedMeshFromVelocityTexture() {\n return MaterialHelperGeometryRendering.GetConfiguration(this._renderer.renderPassId).excludedSkinnedMesh;\n }\n isReady() {\n return this._renderer.isReadyForRendering(this._textureWidth, this._textureHeight);\n }\n record() {\n if (this.textureDescriptions.length === 0 || this.objectList === undefined) {\n throw new Error(`FrameGraphGeometryRendererTask ${this.name}: object list and at least one geometry texture description must be provided`);\n }\n const outputTextureHandle = this._createMultiRenderTargetTexture();\n const depthEnabled = this._checkDepthTextureCompatibility();\n this._buildClearAttachmentsLayout();\n this._registerForRenderPassId(this._renderer.renderPassId);\n const outputTextureDescription = this._frameGraph.textureManager.getTextureDescription(outputTextureHandle[0]);\n this._textureWidth = outputTextureDescription.size.width;\n this._textureHeight = outputTextureDescription.size.height;\n // Create pass\n MaterialHelperGeometryRendering.MarkAsDirty(this._renderer.renderPassId, this.objectList.meshes || this._scene.meshes);\n const pass = this._frameGraph.addRenderPass(this.name);\n pass.setRenderTarget(outputTextureHandle);\n for (let i = 0; i < this.textureDescriptions.length; i++) {\n const description = this.textureDescriptions[i];\n const handle = outputTextureHandle[i];\n const index = MaterialHelperGeometryRendering.GeometryTextureDescriptions.findIndex((f) => f.type === description.type);\n const geometryDescription = MaterialHelperGeometryRendering.GeometryTextureDescriptions[index];\n switch (geometryDescription.type) {\n case 5:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryViewDepthTexture, handle);\n break;\n case 10:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryScreenDepthTexture, handle);\n break;\n case 6:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryViewNormalTexture, handle);\n break;\n case 8:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryWorldNormalTexture, handle);\n break;\n case 9:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryLocalPositionTexture, handle);\n break;\n case 1:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryWorldPositionTexture, handle);\n break;\n case 12:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryAlbedoTexture, handle);\n break;\n case 3:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryReflectivityTexture, handle);\n break;\n case 2:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryVelocityTexture, handle);\n break;\n case 11:\n this._frameGraph.textureManager.resolveDanglingHandle(this.geometryLinearVelocityTexture, handle);\n break;\n }\n }\n pass.setRenderTargetDepth(this.depthTexture);\n pass.setExecuteFunc((context) => {\n this._renderer.renderList = this.objectList.meshes;\n this._renderer.particleSystemList = this.objectList.particleSystems;\n context.setDepthStates(this.depthTest && depthEnabled, this.depthWrite && depthEnabled);\n this._clearAttachmentsLayout.forEach((layout, clearType) => {\n context.clearColorAttachments(clearColors[clearType], layout);\n });\n context.bindAttachments(this._allAttachmentsLayout);\n context.render(this._renderer, this._textureWidth, this._textureHeight);\n });\n }\n dispose() {\n MaterialHelperGeometryRendering.DeleteConfiguration(this._renderer.renderPassId);\n this._renderer.dispose();\n super.dispose();\n }\n _createMultiRenderTargetTexture() {\n const types = [];\n const formats = [];\n const labels = [];\n const useSRGBBuffers = [];\n for (let i = 0; i < this.textureDescriptions.length; i++) {\n const description = this.textureDescriptions[i];\n const index = MaterialHelperGeometryRendering.GeometryTextureDescriptions.findIndex((f) => f.type === description.type);\n if (index === -1) {\n throw new Error(`FrameGraphGeometryRendererTask ${this.name}: unknown texture type ${description.type}`);\n }\n types[i] = description.textureType;\n formats[i] = description.textureFormat;\n labels[i] = MaterialHelperGeometryRendering.GeometryTextureDescriptions[index].name;\n useSRGBBuffers[i] = false;\n }\n const baseHandle = this._frameGraph.textureManager.createRenderTargetTexture(this.name, {\n size: this.size,\n sizeIsPercentage: this.sizeIsPercentage,\n options: {\n createMipMaps: false,\n samples: this.samples,\n types,\n formats,\n useSRGBBuffers,\n labels,\n },\n });\n const handles = [];\n for (let i = 0; i < this.textureDescriptions.length; i++) {\n handles.push(baseHandle + i);\n }\n return handles;\n }\n _checkDepthTextureCompatibility() {\n let depthEnabled = false;\n if (this.depthTexture !== undefined) {\n if (this.depthTexture === backbufferDepthStencilTextureHandle) {\n throw new Error(`FrameGraphGeometryRendererTask ${this.name}: the depth/stencil back buffer is not allowed as a depth texture`);\n }\n const depthTextureDescription = this._frameGraph.textureManager.getTextureDescription(this.depthTexture);\n if (depthTextureDescription.options.samples !== this.samples) {\n throw new Error(`FrameGraphGeometryRendererTask ${this.name}: the depth texture and the output texture must have the same number of samples`);\n }\n this._frameGraph.textureManager.resolveDanglingHandle(this.outputDepthTexture, this.depthTexture);\n depthEnabled = true;\n }\n return depthEnabled;\n }\n _buildClearAttachmentsLayout() {\n const clearAttachmentsLayout = new Map();\n const allAttachmentsLayout = [];\n for (let i = 0; i < this.textureDescriptions.length; i++) {\n const description = this.textureDescriptions[i];\n const index = MaterialHelperGeometryRendering.GeometryTextureDescriptions.findIndex((f) => f.type === description.type);\n const geometryDescription = MaterialHelperGeometryRendering.GeometryTextureDescriptions[index];\n let layout = clearAttachmentsLayout.get(geometryDescription.clearType);\n if (layout === undefined) {\n layout = [];\n clearAttachmentsLayout.set(geometryDescription.clearType, layout);\n for (let j = 0; j < i; j++) {\n layout[j] = false;\n }\n }\n clearAttachmentsLayout.forEach((layout, clearType) => {\n layout.push(clearType === geometryDescription.clearType);\n });\n allAttachmentsLayout.push(true);\n }\n this._clearAttachmentsLayout = new Map();\n clearAttachmentsLayout.forEach((layout, clearType) => {\n this._clearAttachmentsLayout.set(clearType, this._engine.buildTextureLayout(layout));\n });\n this._allAttachmentsLayout = this._engine.buildTextureLayout(allAttachmentsLayout);\n }\n _registerForRenderPassId(renderPassId) {\n const configuration = MaterialHelperGeometryRendering.CreateConfiguration(renderPassId);\n for (let i = 0; i < this.textureDescriptions.length; i++) {\n const description = this.textureDescriptions[i];\n const index = MaterialHelperGeometryRendering.GeometryTextureDescriptions.findIndex((f) => f.type === description.type);\n const geometryDescription = MaterialHelperGeometryRendering.GeometryTextureDescriptions[index];\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