You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#TTP 331057 - EDITOR: MESH PAINT MODE: Texture painting feature appears completely broken
#branch UE4 #proj Editor.MeshPaint #proj Runtime.Engine #summary Mesh paint editor now works as before. #change Regressed most of the change from CL 2033028, however bNeedsTwoCopies is set to false by default. #change MeshPaintEdMode now sets bNeedsTwoCopies on all render targets it makes uses of. #reviewedby lee.clark [CL 2043242 by Barnabas McManners in Main branch]
This commit is contained in:
committed by
UnrealBot
parent
1be4f4e67a
commit
ad78e07053
@@ -1951,13 +1951,13 @@ void FEdModeMeshPaint::StartPaintingTexture( UStaticMeshComponent* InStaticMeshC
|
||||
{
|
||||
TextureData->PaintRenderTargetTexture = NULL;
|
||||
TextureData->PaintRenderTargetTexture = CastChecked<UTextureRenderTarget2D>( StaticConstructObject( UTextureRenderTarget2D::StaticClass(), GetTransientPackage(), NAME_None, RF_Transient ) );
|
||||
TextureData->PaintRenderTargetTexture->bNeedsTwoCopies = true;
|
||||
const bool bForceLinearGamma = true;
|
||||
TextureData->PaintRenderTargetTexture->InitCustomFormat( TextureWidth, TextureHeight, PF_A16B16G16R16, bForceLinearGamma );
|
||||
TextureData->PaintRenderTargetTexture->UpdateResourceImmediate();
|
||||
|
||||
//Duplicate the texture we are painting and store it in the transient package. This texture is a backup of the data incase we want to revert before commiting.
|
||||
TextureData->PaintingTexture2DDuplicate = (UTexture2D*)StaticDuplicateObject(Texture2D, GetTransientPackage(), *FString::Printf(TEXT("%s_TEMP"), *Texture2D->GetName()));
|
||||
|
||||
}
|
||||
TextureData->PaintRenderTargetTexture->AddressX = Texture2D->AddressX;
|
||||
TextureData->PaintRenderTargetTexture->AddressY = Texture2D->AddressY;
|
||||
@@ -1974,11 +1974,11 @@ void FEdModeMeshPaint::StartPaintingTexture( UStaticMeshComponent* InStaticMeshC
|
||||
BrushRenderTargetTexture = CastChecked<UTextureRenderTarget2D>( StaticConstructObject( UTextureRenderTarget2D::StaticClass(), GetTransientPackage(), NAME_None, RF_Transient ) );
|
||||
const bool bForceLinearGamma = true;
|
||||
BrushRenderTargetTexture->ClearColor = FLinearColor::Black;
|
||||
BrushRenderTargetTexture->bNeedsTwoCopies = true;
|
||||
BrushRenderTargetTexture->InitCustomFormat( BrushTargetTextureWidth, BrushTargetTextureHeight, PF_A16B16G16R16, bForceLinearGamma );
|
||||
BrushRenderTargetTexture->UpdateResourceImmediate();
|
||||
BrushRenderTargetTexture->AddressX = TextureData->PaintRenderTargetTexture->AddressX;
|
||||
BrushRenderTargetTexture->AddressY = TextureData->PaintRenderTargetTexture->AddressY;
|
||||
|
||||
}
|
||||
|
||||
const bool bEnableSeamPainting = FMeshPaintSettings::Get().bEnableSeamPainting;
|
||||
@@ -1994,6 +1994,7 @@ void FEdModeMeshPaint::StartPaintingTexture( UStaticMeshComponent* InStaticMeshC
|
||||
BrushMaskRenderTargetTexture = CastChecked<UTextureRenderTarget2D>( StaticConstructObject( UTextureRenderTarget2D::StaticClass(), GetTransientPackage(), NAME_None, RF_Transient ) );
|
||||
const bool bForceLinearGamma = true;
|
||||
BrushMaskRenderTargetTexture->ClearColor = FLinearColor::Black;
|
||||
BrushMaskRenderTargetTexture->bNeedsTwoCopies = true;
|
||||
BrushMaskRenderTargetTexture->InitCustomFormat( BrushTargetTextureWidth, BrushTargetTextureHeight, PF_B8G8R8A8, bForceLinearGamma );
|
||||
BrushMaskRenderTargetTexture->UpdateResourceImmediate();
|
||||
BrushMaskRenderTargetTexture->AddressX = TextureData->PaintRenderTargetTexture->AddressX;
|
||||
@@ -2009,11 +2010,11 @@ void FEdModeMeshPaint::StartPaintingTexture( UStaticMeshComponent* InStaticMeshC
|
||||
SeamMaskRenderTargetTexture = CastChecked<UTextureRenderTarget2D>( StaticConstructObject( UTextureRenderTarget2D::StaticClass(), GetTransientPackage(), NAME_None, RF_Transient ) );
|
||||
const bool bForceLinearGamma = true;
|
||||
SeamMaskRenderTargetTexture->ClearColor = FLinearColor::Black;
|
||||
SeamMaskRenderTargetTexture->bNeedsTwoCopies = true;
|
||||
SeamMaskRenderTargetTexture->InitCustomFormat( BrushTargetTextureWidth, BrushTargetTextureHeight, PF_B8G8R8A8, bForceLinearGamma );
|
||||
SeamMaskRenderTargetTexture->UpdateResourceImmediate();
|
||||
SeamMaskRenderTargetTexture->AddressX = TextureData->PaintRenderTargetTexture->AddressX;
|
||||
SeamMaskRenderTargetTexture->AddressY = TextureData->PaintRenderTargetTexture->AddressY;
|
||||
|
||||
}
|
||||
bGenerateSeamMask = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user