mirror of
https://github.com/mpv-player/mpv
synced 2025-01-12 01:49:33 +00:00
vo_opengl: fix operation on GLES 2.0
GLSL in GLES 2.0 did not have line continuation in its preprocessor. This broke shader compilation. It also broke subtitle rendering in vo_rpi, which reuses some of the OpenGL code. Line continuation was finally added in GLES 3.0, which is perhaps the reason why ANGLE accepted it.
This commit is contained in:
parent
1f38c2107d
commit
c725f39bae
@ -962,8 +962,8 @@ void gl_sc_gen_shader_and_reset(struct gl_shader_cache *sc)
|
||||
}
|
||||
|
||||
// Additional helpers.
|
||||
ADD(frag, "#define LUT_POS(x, lut_size) \\\n");
|
||||
ADD(frag, " mix(0.5 / (lut_size), 1.0 - 0.5 / (lut_size), (x))\n");
|
||||
ADD(frag, "#define LUT_POS(x, lut_size)"
|
||||
" mix(0.5 / (lut_size), 1.0 - 0.5 / (lut_size), (x))\n");
|
||||
|
||||
// custom shader header
|
||||
if (sc->header_text[0]) {
|
||||
|
Loading…
Reference in New Issue
Block a user