mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-22 15:51:30 +11:00
fix xbr-mlv4-multipass on AMD cards. GPU-specific rounding behavior strikes again
This commit is contained in:
parent
6a5b182294
commit
44c0a731de
|
@ -97,14 +97,14 @@ float df(float A, float B)
|
||||||
|
|
||||||
#define GET_PIXEL(PARAM, PIXEL)\
|
#define GET_PIXEL(PARAM, PIXEL)\
|
||||||
info = PARAM;\
|
info = PARAM;\
|
||||||
ay.z = round( modf( info/2.0, info ) );\
|
ay.z = round( modf( info/1.9999, info ) );\
|
||||||
ay.y = round( modf( info/2.0, info ) );\
|
ay.y = round( modf( info/1.9999, info ) );\
|
||||||
ay.x = round( modf( info/2.0, info ) );\
|
ay.x = round( modf( info/1.9999, info ) );\
|
||||||
ax.z = round( modf( info/2.0, info ) );\
|
ax.z = round( modf( info/1.9999, info ) );\
|
||||||
ax.y = round( modf( info/2.0, info ) );\
|
ax.y = round( modf( info/1.9999, info ) );\
|
||||||
ax.x = round( info );\
|
ax.x = round( info );\
|
||||||
iq.x = dot( ax, bin ) - 2.0;\
|
iq.x = dot( ax, bin ) - 1.9999;\
|
||||||
iq.y = dot( ay, bin ) - 2.0;\
|
iq.y = dot( ay, bin ) - 1.9999;\
|
||||||
PIXEL = texture( REF, vTexCoord + iq.x*t1.xy + iq.y*t1.zw ).xyz;\
|
PIXEL = texture( REF, vTexCoord + iq.x*t1.xy + iq.y*t1.zw ).xyz;\
|
||||||
|
|
||||||
#pragma stage vertex
|
#pragma stage vertex
|
||||||
|
@ -117,7 +117,7 @@ layout(location = 2) out float scale_factor;
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_Position = global.MVP * Position;
|
gl_Position = global.MVP * Position;
|
||||||
vTexCoord = TexCoord * 1.0004;
|
vTexCoord = TexCoord * vec2(1.0004, 0.9995);
|
||||||
float2 ps = float2(1.0/params.REFSize.x, 1.0/params.REFSize.y);
|
float2 ps = float2(1.0/params.REFSize.x, 1.0/params.REFSize.y);
|
||||||
float dx = ps.x;
|
float dx = ps.x;
|
||||||
float dy = ps.y;
|
float dy = ps.y;
|
||||||
|
|
Loading…
Reference in a new issue