DrawText produces wrong output

  • brussell
  • Topic Author
More
5 years 3 months ago - 5 years 3 months 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
#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: 5 years 3 months ago by brussell.

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.