diff options
author | Niklas Haas <git@nand.wakku.to> | 2016-06-08 15:05:28 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-06-08 20:50:19 +0200 |
commit | 54c48bd80120a3085e6d23f7cf6124b0657436e7 (patch) | |
tree | d060ec1b942d4d544597c1e7c5fa5898d921edb1 /DOCS/man | |
parent | a15181e5df5ba8a21e6a5b953213f4a72690c47f (diff) | |
download | mpv-54c48bd80120a3085e6d23f7cf6124b0657436e7.tar.bz2 mpv-54c48bd80120a3085e6d23f7cf6124b0657436e7.tar.xz |
vo_opengl: make user hook passes optional
User hooks can now use an extra WHEN expression to specify when the
shader should be run. For example, this can be used to only run a chroma
scaling shader `WHEN CHROMA.w LUMA.w <`.
There's a slight semantics change to user shaders: When trying to bind a
texture that does not exist, a shader will now be silently skipped
(similar to when the condition is false) instead of generating an error.
This allows shader stages to depend on an optional earlier stage without
having to copy/paste the same condition everywhere.
(In other words: there's an implicit condition on all of the bound
textures existing)
Diffstat (limited to 'DOCS/man')
-rw-r--r-- | DOCS/man/vo.rst | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/DOCS/man/vo.rst b/DOCS/man/vo.rst index f8c9c342f8..7eaf2d6636 100644 --- a/DOCS/man/vo.rst +++ b/DOCS/man/vo.rst @@ -746,10 +746,17 @@ Available video output drivers are: WIDTH <szexpr>, HEIGHT <szexpr> Specifies the size of the resulting texture for this pass. ``szexpr`` refers to an expression in RPN (reverse polish - notation), using the operators + - * /, floating point literals, - and references to existing texture sizes such as MAIN.width or - CHROMA.height. By default, these are set to HOOKED.w and HOOKED.h, - respectively. + notation), using the operators + - * / > < !, floating point + literals, and references to existing texture sizes such as + MAIN.width or CHROMA.height. By default, these are set to HOOKED.w + and HOOKED.h, respectively. + + WHEN <szexpr> + Specifies a condition that needs to be true (non-zero) for the + shader stage to be evaluated. If it fails, it will silently be + omitted. (Note that a shader stage like this which has a dependency + on an optional hook point can still cause that hook point to be + saved, which has some minor overhead) OFFSET ox oy Indicates a pixel shift (offset) introduced by this pass. These |