Skip to main content
added 288 characters in body
Source Link
trusktr
  • 255
  • 1
  • 6

I was thinking that I could pass a timestamp in (from requestAnimationFrame) to the vert shader, and just have my easing curves in the GPU instead of using (for example) Tween.js from the outside.

Is this a good idea? Why or why not?

EDIT: After learning more GL and thinking about it, it doesn't seem like I want every shader instance to run a tween that I may only use for a handful of vertices. Can we have only certain shaders run tween calculations if the vertex being animated is the one of the current shader?

I was thinking that I could pass a timestamp in (from requestAnimationFrame) to the vert shader, and just have my easing curves in the GPU instead of using (for example) Tween.js from the outside.

Is this a good idea? Why or why not?

I was thinking that I could pass a timestamp in (from requestAnimationFrame) to the vert shader, and just have my easing curves in the GPU instead of using (for example) Tween.js from the outside.

Is this a good idea? Why or why not?

EDIT: After learning more GL and thinking about it, it doesn't seem like I want every shader instance to run a tween that I may only use for a handful of vertices. Can we have only certain shaders run tween calculations if the vertex being animated is the one of the current shader?

Source Link
trusktr
  • 255
  • 1
  • 6

Easing curves on the GPU?

I was thinking that I could pass a timestamp in (from requestAnimationFrame) to the vert shader, and just have my easing curves in the GPU instead of using (for example) Tween.js from the outside.

Is this a good idea? Why or why not?