尝试给位置加offset,没完全成功
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -119,7 +119,15 @@ UTextureRenderTarget2D* AIronBlock::CreateDeformRT(const FString& RTName, int32
|
||||
RenderTarget->bAutoGenerateMips = false;
|
||||
RenderTarget->AddressX = TA_Clamp;
|
||||
RenderTarget->AddressY = TA_Clamp;
|
||||
|
||||
// 定义你要清除的颜色 (R=0.5, G=0.5, B=0.5)
|
||||
const FLinearColor ClearColor(128.0f, 128.0f, 128.0f, 256.0f);
|
||||
|
||||
// 调用 Kismet Rendering Library 的清除函数
|
||||
UKismetRenderingLibrary::ClearRenderTarget2D(
|
||||
this->GetWorld(), // 通常传入你的 World 或 Actor
|
||||
RenderTarget,
|
||||
ClearColor
|
||||
);
|
||||
// 立即创建RHI资源
|
||||
//RenderTarget->UpdateResource();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user