patriciogonzalezvivo / glsl-pipeline

Prototype complex pipelines directly from a single shader by branching it into stages
MIT License
80 stars 5 forks source link

Request: Ability to reset a GlslPipeline to its initial state #1

Closed matthen closed 11 months ago

matthen commented 11 months ago

Currently there is no simple way to reset a GlslPipeline to its initial state, as when it is first created.

In its initial state we expect:

This is useful e.g. for looping animations, where after a certain time you want to set time back to 0 and start again. Maybe there could be a method added like pipeline.reset()

patriciogonzalezvivo commented 11 months ago

Got it! super useful. When you say buffers to their initial states, you mean cleaning all u_doubleBufferN ? Right? single u_bufferN don't have previous states.

matthen commented 11 months ago

Right