I am finally delving into shaders and have a basic effect working turning a video stream blacknwhite and distorting it with a sinewave (nice glitch to add to oldtv), but I want it to pause the video stream in the shader, is this possible? How to get a still frame from the videoin?
I would also like to change the addressing with an enum or different technique?. Can I declare the different modes (wrap, Border, Mirroronce etc) and call them somehow? Some nodes have an address pin, can I create one?
VideoIn (DShow9) has an Enabled which you should be able to use for the pausing.
effects can not expose enum- and address-pins, but you could use an int like:
int AddressMode;
then you’ll make yourself 3 copies of the sampler, all referencing the same texture but using different addressmode settings.
in the pixelshader you could than use the AddressMode in an if-clause, like:
float4 col;
if (AddressMode == 0)
col = tex2D(Samp1, In.TexCd);
else if (AddressMode == 1)
col = tex2D(Samp2, In.TexCd);
else
col = tex2D(Samp3, In.TexCd);