1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Fix 3point filtering on the Raspberry Pi

This commit is contained in:
Logan McNaughton 2016-06-02 15:14:02 -06:00 committed by Sergey Lipskiy
parent 356d1e291b
commit 30abd96f5b

View File

@ -311,7 +311,15 @@ static const char* fragment_shader_readtex_3point =
"#define TEX_OFFSET(off) texture2D(tex, texCoord - (off)/texSize) \n"
"lowp vec4 filter3point(in sampler2D tex, in mediump vec2 texCoord) \n"
"{ \n"
#ifndef VC
" mediump vec2 texSize = uTextureSize[nCurrentTile]; \n"
#else
" mediump vec2 texSize; \n"
" if (nCurrentTile == 0) \n"
" texSize = uTextureSize[0]; \n"
" else if (nCurrentTile == 1) \n"
" texSize = uTextureSize[1]; \n"
#endif
" mediump vec2 offset = fract(texCoord*texSize - vec2(0.5)); \n"
" offset -= step(1.0, offset.x + offset.y); \n"
" lowp vec4 c0 = TEX_OFFSET(offset); \n"