Get Time


Is there any easy chance to get the time from a fragment shader? Does the graphic card has an internal timer, or do I need to get the timer somehow from the system?

Thank you!

Nope. You need to query the system’s time and then pass it as a uniform to the shader.

Under Windows try timeGetTime, under Linux gettimeofday.