Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uniform float dtime; #21

Open
dashxdr opened this issue Mar 6, 2013 · 1 comment
Open

uniform float dtime; #21

dashxdr opened this issue Mar 6, 2013 · 1 comment

Comments

@dashxdr
Copy link

dashxdr commented Mar 6, 2013

I'd like to have the time delta passed in (time from last frame). If a shader makes use of the backbuffer it ought to know the time it was rendered. As it is it's impossible to abstract away the framerate from computations.

This comes up in this shader:
http://glsl.heroku.com/e#7185.30
If I had faster framerate I'd want the smaller copies moving off into the distance to take a smaller step.

Also I'd love an fps display, it would help greatly in tuning code for efficiency.

@dbtx
Copy link

dbtx commented Feb 15, 2014

I think that does it for the uniform, it's only tested via file:/// but seems to work, hope I didn't really miss something. now for the FPS...

OK I added a button showing fps once a second and an smoothed delta time to be shown there, but it's not perfect... mainly, when you're minimized or off tab or off screen for some seconds, those values get huge and that throws it way off, though briefly. I bet it can be handled but I haven't had any grand ideas yet about how.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants