ReShade::PixelSize

  • sYNTHwAVE88
  • Topic Author
More
5 years 1 month ago #1 by sYNTHwAVE88 ReShade::PixelSize was created by sYNTHwAVE88
I'm curious why 1.0 / ReShade::ScreenSize is significantly more precise than ReShade::PixelSize
It's really noticeable on the horizontal axis

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

  • seri14
More
5 years 1 month ago - 5 years 1 month ago #2 by seri14 Replied by seri14 on topic ReShade::PixelSize
How was it output
float2 A = 1.0 / ReShade::ScreenSize;
float2 B = ReShade::PixelSize;
[Statistics] -> [Show HLSL/GLSL]

My case (this is lower than FLT_EPSILON)
const float2 _50 = float2(0.00099206, 0.00131406);
float2 A;
A = _50;
const float2 _52 = float2(0.00099200, 0.00131400);
float2 B;
B = _52;

[Edit]
I guess out of precision was trimmed at float2(BUFFER_RCP_WIDTH, BUFFER_RCP_HEIGHT).
float precision is about 6 digits.
202px
A = 0.00495049 ... 202.000206
B = 0.00495000 ... 202.020202
3840px
A = 0.00026042 ... 3839.95
B = 0.00026000 ... 3846.15
Last edit: 5 years 1 month ago by seri14.

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

  • seri14
More
5 years 1 month ago #3 by seri14 Replied by seri14 on topic ReShade::PixelSize
Maybe I found the answer.
see line of pp.add_macro_definition("BUFFER_RCP_WIDTH", ...) in runtime.cpp.
The std::to_string(float) is using _scprintf("%f", ...).
default output float format precision is 6 digits. (see MSDN Format specification syntax: printf and wprintf functions )
The following user(s) said Thank You: crosire, 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.