mirror of
https://github.com/izzy2lost/sm64-izzys-port-android.git
synced 2026-07-05 15:19:31 -07:00
Actually fix noise shader for GLES instead of disabling it
This commit is contained in:
@@ -203,11 +203,7 @@ static struct ShaderProgram *gfx_opengl_create_and_load_new_shader(uint32_t shad
|
||||
bool opt_alpha = (shader_id & SHADER_OPT_ALPHA) != 0;
|
||||
bool opt_fog = (shader_id & SHADER_OPT_FOG) != 0;
|
||||
bool opt_texture_edge = (shader_id & SHADER_OPT_TEXTURE_EDGE) != 0;
|
||||
#ifdef USE_GLES
|
||||
bool opt_noise = false;
|
||||
#else
|
||||
bool opt_noise = (shader_id & SHADER_OPT_NOISE) != 0;
|
||||
#endif
|
||||
|
||||
bool used_textures[2] = { 0, 0 };
|
||||
int num_inputs = 0;
|
||||
@@ -333,7 +329,11 @@ static struct ShaderProgram *gfx_opengl_create_and_load_new_shader(uint32_t shad
|
||||
|
||||
append_line(fs_buf, &fs_len, "float random(in vec3 value) {");
|
||||
append_line(fs_buf, &fs_len, " float random = dot(sin(value), vec3(12.9898, 78.233, 37.719));");
|
||||
#ifdef USE_GLES
|
||||
append_line(fs_buf, &fs_len, " return fract(sin(random) * 143.7585453);");
|
||||
#else
|
||||
append_line(fs_buf, &fs_len, " return fract(sin(random) * 143758.5453);");
|
||||
#endif
|
||||
append_line(fs_buf, &fs_len, "}");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user