diff --git a/Content/FirstPerson/Maps/_GENERATED/Administrator/IronBlock_UVFixed.uasset b/Content/FirstPerson/Maps/_GENERATED/Administrator/IronBlock_UVFixed.uasset index a15d5e1..9ea375a 100644 Binary files a/Content/FirstPerson/Maps/_GENERATED/Administrator/IronBlock_UVFixed.uasset and b/Content/FirstPerson/Maps/_GENERATED/Administrator/IronBlock_UVFixed.uasset differ diff --git a/Content/Materials/M_HitCal.uasset b/Content/Materials/M_HitCal.uasset index 8abbce7..4af5117 100644 Binary files a/Content/Materials/M_HitCal.uasset and b/Content/Materials/M_HitCal.uasset differ diff --git a/Content/Materials/M_Iron.uasset b/Content/Materials/M_Iron.uasset index d37aee3..185c53c 100644 Binary files a/Content/Materials/M_Iron.uasset and b/Content/Materials/M_Iron.uasset differ diff --git a/Content/__ExternalActors__/FirstPerson/Maps/FirstPersonMap/5/SI/6K90CL2ZSQWKILI9NQQLEA.uasset b/Content/__ExternalActors__/FirstPerson/Maps/FirstPersonMap/5/SI/6K90CL2ZSQWKILI9NQQLEA.uasset index 393b4bf..8791cda 100644 Binary files a/Content/__ExternalActors__/FirstPerson/Maps/FirstPersonMap/5/SI/6K90CL2ZSQWKILI9NQQLEA.uasset and b/Content/__ExternalActors__/FirstPerson/Maps/FirstPersonMap/5/SI/6K90CL2ZSQWKILI9NQQLEA.uasset differ diff --git a/Content/__ExternalActors__/FirstPerson/Maps/FirstPersonMap/9/72/2N28CSH0YJLTKPRU3M9NTT.uasset b/Content/__ExternalActors__/FirstPerson/Maps/FirstPersonMap/9/72/2N28CSH0YJLTKPRU3M9NTT.uasset deleted file mode 100644 index a97f1a5..0000000 Binary files a/Content/__ExternalActors__/FirstPerson/Maps/FirstPersonMap/9/72/2N28CSH0YJLTKPRU3M9NTT.uasset and /dev/null differ diff --git a/Source/BladeSmith/IronBlock.cpp b/Source/BladeSmith/IronBlock.cpp index d41c179..d7bd91f 100644 --- a/Source/BladeSmith/IronBlock.cpp +++ b/Source/BladeSmith/IronBlock.cpp @@ -107,7 +107,7 @@ UTextureRenderTarget2D* AIronBlock::CreateDeformRT(const FString& RTName, int32 if (RenderTarget) { // **关键修复 1:** 设置为32位浮点数格式,以匹配 FLinearColor 和 CS 的 PF_A32B32G32R32F - RenderTarget->RenderTargetFormat = RTF_RGBA32f; + //RenderTarget->RenderTargetFormat = RTF_RGBA32f; // **关键修复 2:** 明确告诉引擎我们需要为这个纹理创建UAV //RenderTarget->bCanCreateUAV = true; @@ -119,17 +119,21 @@ UTextureRenderTarget2D* AIronBlock::CreateDeformRT(const FString& RTName, int32 RenderTarget->bAutoGenerateMips = false; RenderTarget->AddressX = TA_Clamp; RenderTarget->AddressY = TA_Clamp; + FLinearColor ClearColor = FLinearColor(0.25f, 0.25f, 0.25f, 1.0f); + RenderTarget->ClearColor = ClearColor; + // 立即创建RHI资源 + RenderTarget->UpdateResource(); // 定义你要清除的颜色 (R=0.5, G=0.5, B=0.5) - const FLinearColor ClearColor(0.5, 0.5, 0.5, 1); - + //FLinearColor ClearColor = FLinearColor(0.25f, 0.25f, 0.25f, 1.0f); + // 调用 Kismet Rendering Library 的清除函数 UKismetRenderingLibrary::ClearRenderTarget2D( this->GetWorld(), // 通常传入你的 World 或 Actor RenderTarget, ClearColor ); - // 立即创建RHI资源 - //RenderTarget->UpdateResource(); + FlushRenderingCommands(); + RenderTarget->UpdateResourceImmediate(true); } return RenderTarget; } diff --git a/art/IronBlock.blend b/art/IronBlock.blend index 2bad40c..3853fde 100644 Binary files a/art/IronBlock.blend and b/art/IronBlock.blend differ diff --git a/art/IronBlock_UVFixed.fbx b/art/IronBlock_UVFixed.fbx index 914c4ae..148f3a5 100644 Binary files a/art/IronBlock_UVFixed.fbx and b/art/IronBlock_UVFixed.fbx differ