mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
d632454a23
commit
e90c87a8ef
|
@ -428,7 +428,7 @@ vec4 sample_color(vec2 st)
|
||||||
// Background in Shin Megami Tensei Lucifers
|
// Background in Shin Megami Tensei Lucifers
|
||||||
// I suspect that uv isn't a standard number, so fract is outside of the [0;1] range
|
// 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
|
// 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));
|
dd = clamp(dd, vec2(0.0f), vec2(1.0f));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -403,6 +403,12 @@ float4 sample(float2 st, float q)
|
||||||
{
|
{
|
||||||
uv = st.xyxy + HalfTexel;
|
uv = st.xyxy + HalfTexel;
|
||||||
dd = frac(uv.xy * WH.zw);
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue