Previous topicNext topic

Custom control for shader's parametr

Questions, comments, feedback, etc.
Post Reply
neoz
Posts: 28
Joined: Mon Feb 16, 2015 2:07 pm

Custom control for shader's parametr

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: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Custom control for shader's parametr

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

Re: Custom control for shader's parametr

Post by neoz »

Yeah!!!
You made my day again and again!
Thanx, Eric!!
:)
Post Reply