summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-03 16:08:18 +0200
committerwm4 <wm4@nowhere>2017-08-03 16:19:49 +0200
commitffe0526064309bda2b24c1503e1b43316b33e6d7 (patch)
treeefb8f963a40f35b9d77c96eb2d66a936cad837a9 /DOCS
parent7ec8bd168e9347b00de5b10e87854ddf60b61071 (diff)
downloadmpv-ffe0526064309bda2b24c1503e1b43316b33e6d7.tar.bz2
mpv-ffe0526064309bda2b24c1503e1b43316b33e6d7.tar.xz
vo_opengl: simplify/fix user shader textures
This broke float textures, which were actually used by some shaders. There were probably some other bugs as well. Lots of code can be avoided by using ra_tex_params directly, so do that. The main change is that COMPONENT/FORMAT are replaced by a single FORMAT directive, which takes different parameters now. Due to the mess with 16/32 bit float textures, and because we want to support other APIs than just GL in the future, it's not really clear how this should be handled, and the nice component/type separation makes things actually harder. So just jump the gun and use the ra_format.name names, which were originally meant mostly for debugging. (This is probably something that will be regretted later.) Still only superficially tested, but seems to work. Fixes #4708.
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/man/options.rst22
1 files changed, 12 insertions, 10 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index 814f6fe2d9..02cb4d826d 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -4249,20 +4249,22 @@ The following video options are currently all specific to ``--vo=opengl`` and
The name of this texture. Hooks can then bind the texture under this
name using BIND. This must be the first option of the texture block.
- SIZE <width> [<height>] [<depth>]
+ SIZE <width> [<height>] [<depth>] (required)
The dimensions of the texture. The height and depth are optional. The
type of texture (1D, 2D or 3D) depends on the number of components
specified.
- COMPONENTS <n>
- The number of components per texel contained in the texture. Defaults
- to 1.
-
- FORMAT <spec>
- The texture format for the samples. A valid texture specification is
- the number of bits followed by a single letter which is either ``f``
- (for float), ``i`` (for uint) or ``u`` (for unorm), for example
- ``32f``. Defaults to ``8i``.
+ FORMAT <name> (required)
+ The texture format for the samples. Supported texture formats are listed
+ in debug logging when the ``opengl`` VO is initialized (look for
+ ``Texture formats:``). Usually, this follows OpenGL naming conventions.
+ For example, ``rgb16`` provides 3 channels with normalized 16 bit
+ components. One oddity are float formats: for example, ``rgba16f`` has
+ 16 bit internal precision, but the texture data is provided as 32 bit
+ floats, and the driver converts the data on texture upload.
+
+ Although format names follow a common naming convention, not all of them
+ are available on all hardware, drivers, GL versions, and so on.
FILTER <LINEAR|NEAREST>
The min/magnification filter used when sampling from this texture.