Previous topic • Next topic
Questions, comments, feedback, etc.
-
neoz
- Posts: 28
- Joined: Mon Feb 16, 2015 2:07 pm
Post
by neoz »
Hey guyz!!
Is there any chance to make a custom control parameter for selected shader?
For example, i need to control this string in BWwarpdots.txt:
vec2 position = ( gl_FragCoord.xy - resolution.xy*.3 ) / resolution.x; // 256 angle steps
Changing the number after "resolution.xy" gives the possibilities to full interaction with coordinates from kinect!..
Thanx for any advice))
-
Magic
- Site Admin
- Posts: 3441
- Joined: Wed Apr 09, 2014 9:28 pm
Post
by Magic »
This tutorial explains how to do it:
viewtopic.php?f=3&t=86
But, the quick solution is just to replace .3 with mouse.x:
Code: Select all
vec2 position = ( gl_FragCoord.xy - resolution.xy*mouse.x ) / resolution.x;
Then you can control it with the X Param.
Does that help?
-
neoz
- Posts: 28
- Joined: Mon Feb 16, 2015 2:07 pm
Post
by neoz »
Yeah!!!
You made my day again and again!
Thanx, Eric!!