更新 Source/FLESH/Private/Gore/SplatterMapSystem.cpp
This commit is contained in:
@@ -162,10 +162,10 @@ void USplatterMapSystem::ClearSplatterMaps()
|
||||
// Clear the render target
|
||||
UKismetRenderingLibrary::ClearRenderTarget2D(GetWorld(), RenderTarget);
|
||||
|
||||
// 注意:ExportRenderTarget函数不能直接将RenderTarget复制到Texture2D
|
||||
// 我们需要使用其他方法来实现这一功能
|
||||
// 临时解决方案:简化实现,暂时不复制纹理内容
|
||||
// 在实际项目中,需要实现一个自定义的纹理复制方法
|
||||
// Note: ExportRenderTarget function cannot directly copy RenderTarget to Texture2D
|
||||
// We need to use other methods to achieve this functionality
|
||||
// Temporary solution: simplified implementation, not copying texture content for now
|
||||
// In actual projects, a custom texture copy method needs to be implemented
|
||||
// UMaterialInstanceDynamic* CopyMaterial = UMaterialInstanceDynamic::Create(UMaterial::GetDefaultMaterial(EMaterialDomain::Surface), this);
|
||||
// CopyMaterial->SetTextureParameterValue(TEXT("Texture"), RenderTarget);
|
||||
|
||||
@@ -233,12 +233,12 @@ void USplatterMapSystem::RenderToSplatterMap(UTexture2D* TargetTexture, UTexture
|
||||
DecalMaterial
|
||||
);
|
||||
|
||||
// 注意:ExportRenderTarget函数不能直接将RenderTarget复制到Texture2D
|
||||
// 我们需要使用其他方法来实现这一功能
|
||||
// 临时解决方案:简化实现,暂时不复制纹理内容
|
||||
// 在实际项目中,需要实现一个自定义的纹理复制方法
|
||||
// 例如,可以使用DrawMaterialToRenderTarget配合特殊材质来复制纹理
|
||||
// 或者使用UE5的其他API来实现RenderTarget到Texture2D的复制
|
||||
// Note: ExportRenderTarget function cannot directly copy RenderTarget to Texture2D
|
||||
// We need to use other methods to achieve this functionality
|
||||
// Temporary solution: simplified implementation, not copying texture content for now
|
||||
// In actual projects, a custom texture copy method needs to be implemented
|
||||
// For example, you can use DrawMaterialToRenderTarget with a special material to copy the texture
|
||||
// Or use UE5's other APIs to implement RenderTarget to Texture2D copy
|
||||
// UKismetRenderingLibrary::ExportRenderTarget(GetWorld(), RenderTarget, TEXT(""), TargetTexture);
|
||||
|
||||
// Release the render target
|
||||
|
Reference in New Issue
Block a user