3 ms·
Shaders are cool - I think? I wanted to use them for generative animations , but (maybe I have it wrong) I could not see a way to store state with each pixel. I
by somewhereoutth 6y ago
Shaders are cool - I think? I wanted to use them for generative animations , but (maybe I have it wrong) I could not see a way to store state with each pixel. I wanted the color of the pixels to be a view onto some underlying state at that pixel location - and update that state in a shader manner, so parallel and multi-threaded, with each state step depending only on the state of its neighbors - a generalized pixel if you will.
- antoineMoPa 6y agoSounds like you need a multi-pass shader. As an example, you can store state in one pass, apply operations in another pass, and render in the last pass. Example: https://shadergif.com/gifs/324 https://shadergif.com/gifs/324
- ImprobableTruth 6y agoYou can't store state in pixels, just use a texture. The value of a pixel in the texture is your 'pixel state'.