Hi, i want to run a shader fragment code.
And i want to control some aspects of the beheavior that in gdscript you just put in the _ready() overwrite.
Like so, the things need are 2 states that need to trigeer a scope of action for me to put some code.
So, the fragment code run on every pixel, everyone knows that, but, how it really happen?
Beacuse the problem i have, i believe, would be fixed if i can implement in the shader:
(0 - So, like to every "full" run of the screen, aka, every pixel had a shader pass, i will call that a "loop")
1 - Before each loop, i can overwrite a shader function that execute only once before each single pixel is processed. Aka the ready parallel function. So, i can declare my variable states, etc etc.
2 - At the end of each loop, so, after every pixel had been processed for the frame. A somehow _done() function. This is i think even more important, because it will enable a control stage, that can re-define the state of the variables used by the fragment code.
TLDR
How to have a shader to execute a snipp of code before and after it process the whole screen, every frame?
Thanks for the insights, and if there is a straithfoward way to do that, using only shaders, (for performance of course) sorry about not finding it out already.
Thanks again.