GSdx-d3d: Keep fract in [0;1] range port from OpenGL.

Fixes texture flickering in Oni on d3d11.

Commit:
a8968257db
This commit is contained in:
KrossX 2018-09-27 00:59:31 +02:00 committed by lightningterror
parent d632454a23
commit e90c87a8ef
2 changed files with 7 additions and 1 deletions

View File

@ -428,7 +428,7 @@ vec4 sample_color(vec2 st)
// Background in Shin Megami Tensei Lucifers
// I suspect that uv isn't a standard number, so fract is outside of the [0;1] range
// Note: it is free on GPU but let's do it only for float coordinate
// Strangely Dx doesn't suffer from this issue.
// Strangely DX9 doesn't suffer from this issue.
dd = clamp(dd, vec2(0.0f), vec2(1.0f));
#endif
}

View File

@ -403,6 +403,12 @@ float4 sample(float2 st, float q)
{
uv = st.xyxy + HalfTexel;
dd = frac(uv.xy * WH.zw);
#if SHADER_MODEL >= 0x400
if(PS_FST == 0)
{
dd = clamp(dd, (float2)0.0, (float2)0.9999999);
}
#endif
}
else
{