[Solved] Getting the g_Time value outside of a shader

Basically as the title says I’m looking to access the exact same value that jme internally sets to each shader that demands it as a world param. In java code that is.

WorldParameters {

From what I know it’s supposedly float time in seconds, but no clue as to since when. Is this just converted System.currentTimeMillis()? I’ve tried searching around the jme codebase a bit but I have no idea what to search for really.

may be easier to just pass in your own Time parameter, then you know exactly what it is ?

have a look at UniformBindingManager.java#209

line 209 case Time:

1 Like

time = timer.getTimeInSeconds();

Perrfect. Thanks man.


1 Like