سؤال

I am using the GPUImage framework. And I am writing my own fragment shader. I need to get time data as an input into the fragment shader. What is the proper way to get time data as an input to the fragment shader? Thanks.

هل كانت مفيدة؟

المحلول

Get time data through whatever method you wish on the CPU (perhaps via one of the answers here). Then convert it to whatever datatype you wish to use and pass it as a uniform (using the appropriate glUniform* variant).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top