Hello, I just wanted to try a shader that updates according the time. In The Book of Shaders something called
u_time is used, but in Defold such a variable won’t work. Following the book, I wrote at the beginning part of the code:
uniform float u_time;
And I got the following warning:
WARNING:RENDER: Type for uniform u_time is not supported (6)
Perhaps a little silly - but why did this happen? How can I import some variable telling the running time (and the cursor position, and so on)? Do I need to firstly add a “Fragment Constant” in the material editing interface, and use a Lua script to get the time and transport it to that “constant”?
Besides, since it’s a shader inside Defold there’re definitely specific usages, but I can’t find out where to learn such things systematically. Are there some recommended tutorials and documents?
(I have read the nice tutorial Shaders for beginners but it’s only a start. In addition I have had a look at the Shader Manual, The Book of Shaders, OpenGL ES 2.0 Online Reference Pages., Shader Toy, … But the logical relationship among them is not so clear to me. It seems like that the shaders are more or less different everywhere …)