Repository navigation
modify shader params in real-time #18727
Replies: 3 comments
|
I guess is would also be nice to be able to query the shader parameters for authoritative values during runtime. |
|
Update |
|
You don't need a second socket or a bridge script. Per List Options, For the "authoritative values" part, the option can be read back. Over your existing Keep in mind that this only holds the values you set. It won't contain the defaults from the shaders' The same |
Uh oh!
There was an error while loading. Please reload this page.
I've started playing with custom shaders to correct color quality at runtime and I have several shader fragments that adjust rgb, gamma, saturation, sharpenning, and color temperature, but right now the parameter values are passed at startup. Is there a straight forward way to modify those parameters in real-time while the content is playing?
I'm guessing I need a running lua script to communicate with the shader and a socket connection to to get the values from another process? This socket would need to be separate from the server socket mpv supports for command injection, right?
this is my static startup script
#! /bin/bash
DIR="~/.config/mpv/shaders"
run-appimage /tmpbin/mpv.AppImage
--osd-level=3
--vo=gpu-next
--glsl-shaders=
$DIR/gamma.glsl:
$DIR/rgb.glsl:
$DIR/kelvin.glsl:
$DIR/sat.glsl:
$DIR/adaptivesharpen.glsl
--glsl-shader-opts=
gamma/red=0.8,
gamma/green=0.9,
gamma/blue=1.0,
rgb/red=0.10,
rgb/green=0.105,
rgb/blue=0.105,
kelvin/kelvin=4500,
sat/sat=0.85
--fs
"$@"
All reactions