mirror of
https://github.com/libretro/beetle-psx-libretro.git
synced 2024-11-23 16:59:49 +00:00
Merge pull request #713 from xzn/jinc2_nan
Update JINC2 to prevent NaN, which result in black texture in some cases
This commit is contained in:
commit
2bc4d0161e
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -557,7 +557,8 @@ vec4 resampler(vec4 x)
|
||||
{
|
||||
vec4 res;
|
||||
|
||||
res = (x==vec4(0.0, 0.0, 0.0, 0.0)) ? vec4(wa*wb) : sin(x*wa)*sin(x*wb)/(x*x);
|
||||
// Need to use mix(.., equal(..)) since we want zero check to be component wise
|
||||
res = mix(sin(x*wa)*sin(x*wb)/(x*x), vec4(wa*wb), equal(x,vec4(0.0, 0.0, 0.0, 0.0)));
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -699,7 +699,9 @@ vec4 resampler(vec4 x)
|
||||
{
|
||||
vec4 res;
|
||||
|
||||
res = (x==vec4(0.0, 0.0, 0.0, 0.0)) ? vec4(wa*wb) : sin(x*wa)*sin(x*wb)/(x*x);
|
||||
// res = (x==vec4(0.0, 0.0, 0.0, 0.0)) ? vec4(wa*wb) : sin(x*wa)*sin(x*wb)/(x*x);
|
||||
// Need to use mix(.., equal(..)) since we want zero check to be component wise
|
||||
res = mix(sin(x*wa)*sin(x*wb)/(x*x), vec4(wa*wb), equal(x,vec4(0.0, 0.0, 0.0, 0.0)));
|
||||
|
||||
return res;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user