Shaders: Use mipmap_input flag.

This commit is contained in:
Brandon Wright 2019-01-27 20:14:28 -06:00
parent 5fc0271330
commit 9b67d0ad8b
2 changed files with 7 additions and 0 deletions

View File

@ -185,6 +185,9 @@ bool GLSLShader::load_shader_preset_file(char *filename)
sprintf(key, "::wrap_mode%u", i);
pass.wrap_mode = wrap_mode_string_to_enum (conf.GetString (key ,""));
sprintf(key, "::mipmap_input%u", i);
pass.mipmap_input = conf.GetBool (key);
sprintf(key, "::frame_count_mod%u", i);
pass.frame_count_mod = conf.GetInt(key, 0);
@ -731,6 +734,9 @@ void GLSLShader::render(GLuint &orig,
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, pass[i].wrap_mode);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, pass[i].wrap_mode);
if (pass[i].mipmap_input)
glGenerateMipmap(GL_TEXTURE_2D);
glUseProgram(pass[i].program);
#ifdef USE_SLANG
if (using_slang)

View File

@ -118,6 +118,7 @@ typedef struct
GLuint width;
GLuint height;
GLuint filter;
bool mipmap_input;
GLSLUniforms unif;
#ifdef USE_SLANG