Timing notion in shader?

Hi guys,

Does anybody could tell me how shaders deal with timing?

Do the shaders are vvvv mainloop dependant?

Is it possible to introduce a timing notion in a shader?


a shader is executed in every frame that the graphics card renders. time variables have to come from the application, a shader knows nothing about the outside world. vvvv synchronizes its mainloop to the graphics card, if your patch is not to slow. if the full framerate is not possible vvvv tries to have a framerate that is a divisor of the graphics cards framerate. if you play video, the mainloop is synced to the video framerate according to the setting of the VideoTexture node.

you could create a stopwatch node and create a pin in the shader to get the time inside the shader.
the only question is: what do you want to do with that information?

I don’t khnow exactly but with your information I understand that I don’t need to use some much renderer in my Deinterlacer Patch.
I’m looking for a way to improve this patch.

Thank you to answer so fast.

for deinterlacing you will need to know whether directshow delivered a new video frame in the current vvvv frame or not.

as each frame encodes two fields, you need to know whether to generate the first or second field from the frame.

i guess this feature is still on the vvvv wishlist.

stopwatches, toggles or counters have at maximum a 50% chance helping you with that.