TheFuseLab / VL.Fuse

A library for visually programming on the GPU, built to enable rapid workflows and modular approaches to accelerated graphics, logic and computation.
https://www.thefuselab.io
MIT License
262 stars 21 forks source link

Ensure stable IDs for every shader so the stride shader cache works #39

Open tebjan opened 3 years ago

tebjan commented 3 years ago

basically, every shader generation needs to have a context that carries the ID counter/generator. on every recompile the id counter can be created together with the compilation context. this will make sure that the shaders will always be the same at every start of vvvv.

this is how it is done for ShaderFX: https://github.com/vvvv/VL.Stride/commit/a50ae1da61593db59d97cfec4223cf908190f55c#diff-91f406fa91afc39ec40496e370408932bc025abdbb4c3941be7f3a1d3e2f9a35R18

here are two screenshots from two starts of the same help patch: image image