- Posts: 308
DrawText produces wrong output
- brussell
-
Topic Author
- Offline
Less More
10 months 1 week ago - 10 months 1 week ago #1 by brussell
DrawText produces wrong output was created by brussell
There seems to be a bug in the "DrawText_Digit" function from DrawText.fxh.
See this example file:
DrawDigitTest.fx
Input 82 results in output: 81
Other examples are:
100 -> 00
380 -> 370
See this example file:
DrawDigitTest.fx
#include "ReShadeUI.fxh"
uniform float testfloat < __UNIFORM_SLIDER_FLOAT1
ui_min = 0; ui_max = 1000;
ui_step = 1;
> = 100;
#include "ReShade.fxh"
#include "DrawText.fxh"
float4 PS_DrawDigitTest(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target
{
float res = 0;
DrawText_Digit(float2(500.0 , 500.0), 32, 1, texcoord, 0, testfloat , res);
return res;
}
technique DrawDigitTest
{
pass {
VertexShader = PostProcessVS;
PixelShader = PS_DrawDigitTest;
}
}
Input 82 results in output: 81
Other examples are:
100 -> 00
380 -> 370
Last edit: 10 months 1 week ago by brussell.
Please Log in or Create an account to join the conversation.