vo_gpu: allow user shader to fix texture offset

This commit essentially makes user shader able to fix offset (produced
by other prescaler, for example) like builtin `--scale`.
This commit is contained in:
Bin Jin
2019-03-12 02:24:51 +00:00
committed by sfan5
parent 4d001bb30d
commit ae1c489b31
4 changed files with 52 additions and 10 deletions

View File

@@ -4572,13 +4572,19 @@ The following video options are currently all specific to ``--vo=gpu`` and
hook point can still cause that hook point to be saved, which has some
minor overhead)
OFFSET <ox> <oy>
OFFSET <ox oy | ALIGN>
Indicates a pixel shift (offset) introduced by this pass. These pixel
offsets will be accumulated and corrected during the next scaling pass
(``cscale`` or ``scale``). The default values are 0 0 which correspond
to no shift. Note that offsets are ignored when not overwriting the
hooked texture.
A special value of ``ALIGN`` will attempt to fix existing offset of
HOOKED by align it with reference. It requires HOOKED to be resizable
(see below). It works transparently with fragment shader. For compute
shader, the predefined ``texmap`` macro is required to handle coordinate
mapping.
COMPONENTS <n>
Specifies how many components of this pass's output are relevant and
should be stored in the texture, up to 4 (rgba). By default, this value