summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/user_shaders.h
Commit message (Collapse)AuthorAgeFilesLines
* vo_opengl: move eval_szexpr to user_shaders.cNiklas Haas2016-07-031-0/+5
| | | | | | This moves some of the bulky user-shader specific logic into the file dedicated to it. Rather than expose video.c state, variable lookup is now done via a simulated closure.
* vo_opengl: make user hook passes optionalNiklas Haas2016-06-081-0/+5
| | | | | | | | | | | | | | | | 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)
* vo_opengl: remove unused global variablewm42016-05-161-1/+1
| | | | ?
* vo_opengl: use RPN expressions for user hook sizesNiklas Haas2016-05-151-1/+28
| | | | | | | | | This replaces the previous TRANSFORM by WIDTH, HEIGHT and OFFSET where WIDTH and HEIGHT are RPN expressions. This allows for more fine-grained control over the output size, and also makes sure that overwriting existing textures works more cleanly. (Also add some more useful bstr functions)
* vo_opengl: support external user hooksNiklas Haas2016-05-151-0/+42
This allows users to add their own near-arbitrary hooks to the vo_opengl processing pipeline, greatly enhancing the flexibility of user shaders. This enables, among other things, user shaders such as CrossBilateral, SuperRes, LumaSharpen and many more. To make parsing the user shaders easier, shaders are now loaded as bstrs, and the hooks are set up during video reconfig instead of on every single frame.