mirror of https://github.com/PCSX2/pcsx2.git
glsl: keep fract in [0;1] range
Shin Megami Tensei Lucifers seems to generate infinites values. I suspect that DX always clamp fract output. Finally fix #782 !
This commit is contained in:
parent
c0d0e2e89d
commit
a8968257db
|
@ -236,6 +236,13 @@ vec4 sample_color(vec2 st, float q)
|
|||
{
|
||||
uv = st.xyxy + HalfTexel;
|
||||
dd = fract(uv.xy * WH.zw);
|
||||
#if (PS_FST == 0)
|
||||
// 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.
|
||||
dd = clamp(dd, vec2(0.0f), vec2(1.0f));
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1140,6 +1140,13 @@ static const char* tfx_fs_all_glsl =
|
|||
" {\n"
|
||||
" uv = st.xyxy + HalfTexel;\n"
|
||||
" dd = fract(uv.xy * WH.zw);\n"
|
||||
"#if (PS_FST == 0)\n"
|
||||
" // Background in Shin Megami Tensei Lucifers\n"
|
||||
" // I suspect that uv isn't a standard number, so fract is outside of the [0;1] range\n"
|
||||
" // Note: it is free on GPU but let's do it only for float coordinate\n"
|
||||
" // Strangely Dx doesn't suffer from this issue.\n"
|
||||
" dd = clamp(dd, vec2(0.0f), vec2(1.0f));\n"
|
||||
"#endif\n"
|
||||
" }\n"
|
||||
" else\n"
|
||||
" {\n"
|
||||
|
|
Loading…
Reference in New Issue