3 ms·
More generally, `new_state, framebuffer = update(old_state, input, time_delta)` How far away are we from being able to represent the GPU state and rendering in
by sph 3y ago
More generally, `new_state, framebuffer = update(old_state, input, time_delta)`
How far away are we from being able to represent the GPU state and rendering instructions with simple datastructures ready to be submitted wholesale to the driver?
- tubs 3y agoThat’s pretty much what a command buffer is in any of the modern gpu apis. Recording it is still command driven but trying to give an entire app scene in one go is really messy. We tried this internally on our gpu before Vulkan.
- nottorp 3y agoI know it's harder, but can we please decouple state updates from rendering?
- nine_k 3y agoGPU could compute state separate from rendering, if such updates are simple and independent enough. (In many cases, they are not.)
- taneq 3y ago100%. This relatively small amount of extra work makes it SO much easier to debug both rendering and state update code.
- matsemann 3y agoEven better would probably be to run the state update X amount of times per second, not depending on framerate at all. Otherwise you mess with physics. And then render based on delta and interpolate movements.
- nottorp 3y agoI thought thats what i meant by decoupling :) Although using a time delta makes OT easier than having to force X times Per second
- matsemann 3y agoYeah my comment was probably supposed to be to a different sibling. Using a time delta would give different results when doing non-linear stuff. Like applying forces. It's different to apply "force * dt" vs doing "force * 0.5dt" twice. Also if you use a big dt you could end up going through walls or similar. So therefore the physics engine should run at defined ticks in most instances, or it will behave differently based on framerate. https://gafferongames.com/post/fix_your_timestep/ https://gafferongames.com/post/fix_your_timestep/
- iamflimflam1 3y agoIn all the, admittedly amateur, games I’ve made I’ve been very religious about this. It never even occurred to me that not splitting this was an option. And I can’t think of any reason why you’d combine them.