How to interact using scripts and shaders #17402
-
|
I'd like to try using shaders to draw a circle at the mouse position. This requires passing the mouse position to the shader. Are there any documents or examples I can refer to?
|
Beta Was this translation helpful? Give feedback.
Answered by
verygoodlee
Feb 12, 2026
Replies: 1 comment 2 replies
-
|
Have you tried the --glsl-shader-opts option? Here is a example, hdr-toys observe the What you need to do is almost the same as it is. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
ahaoboy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Have you tried the --glsl-shader-opts option?
Here is a example, hdr-toys observe the
container-fpschange and pass it to shader via--glsl-shader-optsoption.https://github.com/natural-harmonia-gropius/hdr-toys/blob/5bce8a63c4df7fe8d147e9e356797518293821fb/scripts/hdr-toys.lua#L8-L13
https://github.com/natural-harmonia-gropius/hdr-toys/blob/5bce8a63c4df7fe8d147e9e356797518293821fb/shaders/hdr-toys/tone-mapping/astra.glsl#L121-L125
What you need to do is almost the same as it is.