Repository navigation
modify shader params in real-time #18727
Replies: 2 comments
|
I guess is would also be nice to be able to query the shader parameters for authoritative values during runtime. |
0 replies
|
Update |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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