mirror of https://github.com/snes9xgit/snes9x.git
Shaders: Use mipmap_input flag.
This commit is contained in:
parent
5fc0271330
commit
9b67d0ad8b
|
@ -185,6 +185,9 @@ bool GLSLShader::load_shader_preset_file(char *filename)
|
||||||
sprintf(key, "::wrap_mode%u", i);
|
sprintf(key, "::wrap_mode%u", i);
|
||||||
pass.wrap_mode = wrap_mode_string_to_enum (conf.GetString (key ,""));
|
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);
|
sprintf(key, "::frame_count_mod%u", i);
|
||||||
pass.frame_count_mod = conf.GetInt(key, 0);
|
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_S, pass[i].wrap_mode);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, 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);
|
glUseProgram(pass[i].program);
|
||||||
#ifdef USE_SLANG
|
#ifdef USE_SLANG
|
||||||
if (using_slang)
|
if (using_slang)
|
||||||
|
|
|
@ -118,6 +118,7 @@ typedef struct
|
||||||
GLuint width;
|
GLuint width;
|
||||||
GLuint height;
|
GLuint height;
|
||||||
GLuint filter;
|
GLuint filter;
|
||||||
|
bool mipmap_input;
|
||||||
|
|
||||||
GLSLUniforms unif;
|
GLSLUniforms unif;
|
||||||
#ifdef USE_SLANG
|
#ifdef USE_SLANG
|
||||||
|
|
Loading…
Reference in New Issue