From 7f300b4204d33e33308d24eea9107ff60db36cc8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 25 Jan 2016 20:24:41 +0100 Subject: vo_opengl: rename custom shader entrypoint from sample to sample_pixel "sample" is a reserved identifier at least in GLES ES. Suggestions for a better name than "sample_pixel" are still welcome. Fixes #2733. --- DOCS/interface-changes.rst | 2 ++ DOCS/man/vo.rst | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'DOCS') diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index 31abc3d1f4..ee7d2cbe4d 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -25,6 +25,8 @@ Interface changes - add --audio-normalize-downmix - change the default downmix behavior (--audio-normalize-downmix=yes to get the old default) + - VO opengl custom shaders must now use "sample_pixel" as function name, + instead of "sample" --- mpv 0.15.0 --- - change "yadif" video filter defaults --- mpv 0.14.0 --- diff --git a/DOCS/man/vo.rst b/DOCS/man/vo.rst index bc0dd9fd12..4f2641a11e 100644 --- a/DOCS/man/vo.rst +++ b/DOCS/man/vo.rst @@ -657,7 +657,11 @@ Available video output drivers are: These files must define a function with the following signature:: - vec4 sample(sampler2D tex, vec2 pos, vec2 tex_size) + vec4 sample_pixel(sampler2D tex, vec2 pos, vec2 tex_size) + + (If there is no string ``sample_pixel`` in the shader script, it will + use ``sample`` instead. This is a compatibility hack for older shader + scripts, and is deprecated.) The meanings of the parameters are as follows: -- cgit v1.2.3