You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Fix font materials incorrectly marked as opaque, not blending properly. Font materials are forced into translucent blending to work properly
[CODEREVIEW] nick.darnell #ROBOMERGE-SOURCE: CL 11601928 via CL 11602010 via CL 11602175 #ROBOMERGE-BOT: (v656-11643781) [CL 11730898 by matt kuhlenschmidt in Main branch]
This commit is contained in:
@@ -1054,6 +1054,11 @@ void FSlateRHIRenderingPolicy::DrawElements(
|
||||
{
|
||||
PixelShader->SetBlendState(GraphicsPSOInit, Material);
|
||||
FSlateShaderResource* MaskResource = MaterialShaderResource->GetTextureMaskResource();
|
||||
if (MaskResource && (Material->GetBlendMode() == EBlendMode::BLEND_Opaque || Material->GetBlendMode() == EBlendMode::BLEND_Masked))
|
||||
{
|
||||
// Font materials require some form of translucent blending
|
||||
GraphicsPSOInit.BlendState = TStaticBlendState<CW_RGBA, BO_Add, BF_SourceAlpha, BF_InverseSourceAlpha, BO_Add, BF_InverseDestAlpha, BF_One>::GetRHI();
|
||||
}
|
||||
|
||||
GraphicsPSOInit.BoundShaderState.VertexDeclarationRHI = bUseInstancing ? GSlateInstancedVertexDeclaration.VertexDeclarationRHI : GSlateVertexDeclaration.VertexDeclarationRHI;
|
||||
GraphicsPSOInit.BoundShaderState.VertexShaderRHI = VertexShader.GetVertexShader();
|
||||
|
||||
Reference in New Issue
Block a user