mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Force load texture level 0 when mip-mapping is not used.
This solves problem with court texture in Mario Tennis: the game set mipmap level, texture loaded with mip-maps but color combiner does not use LOD factor. Fetch with texture2D loads texel from best suiting level, but we need only level 0.
This commit is contained in:
parent
35ea6f28fb
commit
a84006ce5f
|
@ -533,12 +533,12 @@ static const char* fragment_shader_readtex =
|
|||
"uniform lowp int uTextureFilterMode; \n"
|
||||
"lowp vec4 filterNearest(in sampler2D tex, in mediump vec2 texCoord)\n"
|
||||
"{ \n"
|
||||
" return texture(tex, texCoord); \n"
|
||||
" return texture2DLod(tex, texCoord, 0.0); \n"
|
||||
"} \n"
|
||||
// 3 point texture filtering.
|
||||
// Original author: ArthurCarvalho
|
||||
// GLSL implementation: twinaphex, mupen64plus-libretro project.
|
||||
"#define TEX_OFFSET(off) texture2D(tex, texCoord - (off)/texSize) \n"
|
||||
"#define TEX_OFFSET(off) texture2DLod(tex, texCoord - (off)/texSize, 0.0) \n"
|
||||
"lowp vec4 filter3point(in sampler2D tex, in mediump vec2 texCoord) \n"
|
||||
"{ \n"
|
||||
" mediump vec2 texSize = vec2(textureSize(tex,0)); \n"
|
||||
|
|
Loading…
Reference in New Issue
Block a user