4 ms·
“their parallel nature makes them memoryless and stateless. This translates to: “You can’t store or share data between pixels or shader executions.”” This kind
by Waterluvian 3y ago
“their parallel nature makes them memoryless and stateless. This translates to: “You can’t store or share data between pixels or shader executions.””
This kind of constraint is so liberating for me for some reason. It just narrows the space a lot I guess.
I also kind of love not having imports and libraries as that also really simplifies things.
- prox 3y agoI might be wrong but there are compute shaders that can retake inputs and well, do more computing on them afaik.
- nwoli 3y agoYou can set up shaders to access a shared global texture (and write to it). It’s more expensive and a bit to set up so it’s not totally true, but it’s a good first mental model
- superMayo 3y agoIndeed it's a simplification! You can use buffers to keep information from previous states or share state between pixels (for both fragment and compute shaders). Though it can greatly reduce the performance sometimes. For an intro however, I think it's simpler to assume no memory nor shared state.
- prox 3y agoAh yes, its good to simplify in the beginning! Cool article in any case!
- signa11 3y ago> This kind of constraint is so liberating for me for some reason. if you like this kind of a thing, erlang is a kind of thing you would like :o)