Adding an FPS argument. The renderers now determine whether the current frame should be rendered, and passes use that to determine whether to render or not. The rain pass, however, will still update the simulation at full speed.

This commit is contained in:
Rezmason
2022-10-03 23:45:56 -07:00
parent fb3fb89d95
commit b86b97fde9
19 changed files with 123 additions and 34 deletions

View File

@@ -135,7 +135,11 @@ export default ({ config, device }) => {
};
};
const run = (encoder) => {
const run = (encoder, shouldRender) => {
if (!shouldRender) {
return;
}
const computePass = encoder.beginComputePass();
computePass.setPipeline(blurPipeline);