Text rendering issue in DirectX 12 integration with proprietary Engine
Posted: 17 Jun 2022, 10:25
Hi,
We have successfully integrated Noesis GUI within our c++ engine and with D3D11 renderer everthing seems to render as expected.
However when using a D3D12 renderer, we have encountered a problem with text rendering.
We have tested this with the Simple "Hello World" sample xaml found in Noesis GUI Samples.
By changing the "Hello world" text in the button to "ABCDEFGHIJKLMNOPQRSTA" everything looks correct, but when the last A character is changed to a new character in alphabetics that is beyond 'T', first letter 'A' in the text is changed to the last letter typed in the text, but with offsetted UV coordinate. Also RenderDoc capture shows, that R8_UNORM formatted glyphs texture doesn't anymore represent correct glyphs. It seems like the number of glyphs is restricted to 20. The last image represents the issue with UVX replacing the beginning ABC with offsetted version of UVX.
Also after adding the next alphabet which exceeds the limit of 20, the background gradient starts having weird dark bars.
You will find the XAML layout used to test this issue at the end of this message.
Currently we are unable to identify the root cause for the issue.




We have successfully integrated Noesis GUI within our c++ engine and with D3D11 renderer everthing seems to render as expected.
However when using a D3D12 renderer, we have encountered a problem with text rendering.
We have tested this with the Simple "Hello World" sample xaml found in Noesis GUI Samples.
By changing the "Hello world" text in the button to "ABCDEFGHIJKLMNOPQRSTA" everything looks correct, but when the last A character is changed to a new character in alphabetics that is beyond 'T', first letter 'A' in the text is changed to the last letter typed in the text, but with offsetted UV coordinate. Also RenderDoc capture shows, that R8_UNORM formatted glyphs texture doesn't anymore represent correct glyphs. It seems like the number of glyphs is restricted to 20. The last image represents the issue with UVX replacing the beginning ABC with offsetted version of UVX.
Also after adding the next alphabet which exceeds the limit of 20, the background gradient starts having weird dark bars.
You will find the XAML layout used to test this issue at the end of this message.
Currently we are unable to identify the root cause for the issue.
Code: Select all
<Button Content="ABCDEFGHIJKLMNOPQRSTA" Margin="0,30,0,0"/>
Code: Select all
<Button Content="ABCDEFGHIJKLMNOPQRSTU" Margin="0,30,0,0"/>


Code: Select all
<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Grid.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#FF123F61"/>
<GradientStop Offset="0.6" Color="#FF0E4B79"/>
<GradientStop Offset="0.7" Color="#FF106097"/>
</LinearGradientBrush>
</Grid.Background>
<Viewbox>
<StackPanel Margin="50">
<Button Content="ABCDEFGHIJKLMNOPQRSTUVX" Margin="0,30,0,0"/>
<Rectangle Height="5" Margin="-10,20,-10,0">
<Rectangle.Fill>
<RadialGradientBrush>
<GradientStop Offset="0" Color="#40000000"/>
<GradientStop Offset="1" Color="#00000000"/>
</RadialGradientBrush>
</Rectangle.Fill>
</Rectangle>
</StackPanel>
</Viewbox>
</Grid>