From 7526a998cb36c5c39734364c678d56ffafe70b9c Mon Sep 17 00:00:00 2001 From: fgsfds Date: Wed, 17 Jun 2020 04:40:14 +0300 Subject: [PATCH] 'filter' is a reserved keyword in GLSL but only Intel drivers get pissed at this --- src/pc/gfx/gfx_opengl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pc/gfx/gfx_opengl.c b/src/pc/gfx/gfx_opengl.c index 736fbd03..b3476cef 100644 --- a/src/pc/gfx/gfx_opengl.c +++ b/src/pc/gfx/gfx_opengl.c @@ -315,14 +315,14 @@ static struct ShaderProgram *gfx_opengl_create_and_load_new_shader(uint32_t shad append_line(fs_buf, &fs_len, " vec4 c2 = TEX_OFFSET(vec2(offset.x, offset.y - sign(offset.y)));"); append_line(fs_buf, &fs_len, " return c0 + abs(offset.x)*(c1-c0) + abs(offset.y)*(c2-c0);"); append_line(fs_buf, &fs_len, "}"); - append_line(fs_buf, &fs_len, "vec4 sampleTex(in sampler2D tex, in vec2 uv, in vec2 texSize, in bool filter) {"); - append_line(fs_buf, &fs_len, "if (filter)"); + append_line(fs_buf, &fs_len, "vec4 sampleTex(in sampler2D tex, in vec2 uv, in vec2 texSize, in bool dofilter) {"); + append_line(fs_buf, &fs_len, "if (dofilter)"); append_line(fs_buf, &fs_len, "return filter3point(tex, uv, texSize);"); append_line(fs_buf, &fs_len, "else"); append_line(fs_buf, &fs_len, "return texture2D(tex, uv);"); append_line(fs_buf, &fs_len, "}"); } else { - append_line(fs_buf, &fs_len, "vec4 sampleTex(in sampler2D tex, in vec2 uv, in vec2 texSize, in bool filter) {"); + append_line(fs_buf, &fs_len, "vec4 sampleTex(in sampler2D tex, in vec2 uv, in vec2 texSize, in bool dofilter) {"); append_line(fs_buf, &fs_len, "return texture2D(tex, uv);"); append_line(fs_buf, &fs_len, "}"); }