Hello, i am at the very very beginning of shader programming and was wondering if it’s possible to create a “spreadable” integrate-like function in shader.
The idea was to get a random spread of static values from a dynamic buffer and then upadate each slice by adding the initial value after each “iteration”.
I am using SV_InstanceID in vertex shader to get the current instance id.
I have been trying a couple of solutions but none of them have worked.
Any suggestion is welcome, thank you
use compute shader for that so you can read and write to the destination resource at the same time. so you can do if the layer connected to a Renderer (DX11 Buffer)
Ok thank you very much for your help, i’m not quite into compute shaders yet but i will keep this into consideration.
Do you think it will be possible to do it in vertex shader if i consider to store those values in a new array/spread instead of reading and writing from/to the same source?