diff --git a/libweston/renderer-gl/fragment.glsl b/libweston/renderer-gl/fragment.glsl index 45e4e954..2036490a 100644 --- a/libweston/renderer-gl/fragment.glsl +++ b/libweston/renderer-gl/fragment.glsl @@ -50,7 +50,7 @@ precision mediump float; * snippet. */ const int c_variant = DEF_VARIANT; -const bool c_debug = DEF_DEBUG; +const bool c_green_tint = DEF_GREEN_TINT; vec4 yuva2rgba(float y, float u, float v, float a) @@ -125,6 +125,6 @@ main() gl_FragColor = vec4(1.0, 0.3, 1.0, 1.0); } - if (c_debug) + if (c_green_tint) gl_FragColor = vec4(0.0, 0.3, 0.0, 0.2) + gl_FragColor * 0.8; } diff --git a/libweston/renderer-gl/gl-shaders.c b/libweston/renderer-gl/gl-shaders.c index 320f78df..84275fec 100644 --- a/libweston/renderer-gl/gl-shaders.c +++ b/libweston/renderer-gl/gl-shaders.c @@ -63,7 +63,7 @@ shader_init(struct gl_shader *shader, struct gl_renderer *renderer, const char *vertex_source, const char *fragment_variant) { static const char fragment_shader_attrs_fmt[] = - "#define DEF_DEBUG %s\n" + "#define DEF_GREEN_TINT %s\n" "#define DEF_VARIANT %s\n" ; char msg[512]; @@ -71,7 +71,7 @@ shader_init(struct gl_shader *shader, struct gl_renderer *renderer, int ret; const char *sources[3]; char *attrs; - const char *def_debug; + const char *def_green_tint; shader->vertex_shader = compile_shader(GL_VERTEX_SHADER, 1, &vertex_source); @@ -79,12 +79,12 @@ shader_init(struct gl_shader *shader, struct gl_renderer *renderer, return -1; if (renderer->fragment_shader_debug) - def_debug = "true"; + def_green_tint = "true"; else - def_debug = "false"; + def_green_tint = "false"; ret = asprintf(&attrs, fragment_shader_attrs_fmt, - def_debug, fragment_variant); + def_green_tint, fragment_variant); if (ret < 0) return -1;