Skip to content

Commit

Permalink
Correct mipmap shader for case when max tile is 0.
Browse files Browse the repository at this point in the history
Up shader storage version.
  • Loading branch information
gonetz committed Jun 16, 2018
1 parent b9bfbf4 commit 3e0c635
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Expand Up @@ -1680,8 +1680,10 @@ class ShaderMipmap : public ShaderPart
" if (magnify && ((uTextureDetail & 1) != 0)) \n"
" lod_frac = 1.0 - lod_frac; \n"
" if (uMaxTile == 0) { \n"
" if (uEnableLod != 0 && (uTextureDetail & 2) == 0) \n"
" readtex1 = readtex0; \n"
" if (uEnableLod != 0) { \n"
" if ((uTextureDetail & 2) == 0) readtex1 = readtex0; \n"
" else if (!magnify) readtex0 = readtex1; \n"
" } \n"
" return lod_frac; \n"
" } \n"
" if (uEnableLod == 0) return lod_frac; \n"
Expand Down
2 changes: 1 addition & 1 deletion src/Graphics/OpenGLContext/GLSL/glsl_ShaderStorage.h
Expand Up @@ -20,7 +20,7 @@ namespace glsl {
bool _saveCombinerKeys(const graphics::Combiners & _combiners) const;
bool _loadFromCombinerKeys(graphics::Combiners & _combiners);

const u32 m_formatVersion = 0x20U;
const u32 m_formatVersion = 0x21U;
const u32 m_keysFormatVersion = 0x04;
const opengl::GLInfo & m_glinfo;
opengl::CachedUseProgram * m_useProgram;
Expand Down

0 comments on commit 3e0c635

Please sign in to comment.