fix ly shine inverted font colors
Make AtomFont use the same vertex color format as LyShine.
This commit is contained in:
@@ -896,7 +896,7 @@ AZ::RHI::Ptr<AZ::RPI::DynamicDrawContext> AZ::AtomFont::GetOrCreateDynamicDrawFo
|
||||
shaderOptions.push_back(AZ::RPI::ShaderOption(AZ::Name("o_useColorChannels"), AZ::Name("false")));
|
||||
shaderOptions.push_back(AZ::RPI::ShaderOption(AZ::Name("o_clamp"), AZ::Name("true")));
|
||||
dynamicDraw->InitShaderWithVariant(shader, &shaderOptions);
|
||||
dynamicDraw->InitVertexFormat({{"POSITION", RHI::Format::R32G32B32_FLOAT}, {"COLOR", RHI::Format::R8G8B8A8_UNORM}, {"TEXCOORD0", RHI::Format::R32G32_FLOAT}});
|
||||
dynamicDraw->InitVertexFormat({{"POSITION", RHI::Format::R32G32B32_FLOAT}, {"COLOR", RHI::Format::B8G8R8A8_UNORM}, {"TEXCOORD0", RHI::Format::R32G32_FLOAT}});
|
||||
dynamicDraw->EndInit();
|
||||
|
||||
// exclusive lock while writing
|
||||
|
||||
@@ -864,7 +864,7 @@ int AZ::FFont::CreateQuadsForText(const RHI::Viewport& viewport, float x, float
|
||||
if (drawFrame)
|
||||
{
|
||||
ColorB tempColor(255, 255, 255, 255);
|
||||
uint32_t frameColor = tempColor.pack_abgr8888(); //note: this ends up in r,g,b,a order on little-endian machines
|
||||
uint32_t frameColor = tempColor.pack_argb8888(); //note: this ends up in r,g,b,a order on little-endian machines
|
||||
|
||||
Vec2 textSize = GetTextSizeUInternal(viewport, str, asciiMultiLine, ctx);
|
||||
|
||||
@@ -1122,7 +1122,7 @@ int AZ::FFont::CreateQuadsForText(const RHI::Viewport& viewport, float x, float
|
||||
{
|
||||
ColorB tempColor = color;
|
||||
tempColor.a = ((uint32_t) tempColor.a * alphaBlend) >> 8;
|
||||
packedColor = tempColor.pack_abgr8888(); //note: this ends up in r,g,b,a order on little-endian machines
|
||||
packedColor = tempColor.pack_argb8888(); //note: this ends up in r,g,b,a order on little-endian machines
|
||||
}
|
||||
|
||||
if (ctx.m_drawTextFlags & eDrawText_UseTransform)
|
||||
|
||||
Reference in New Issue
Block a user