Hi everyone. I’m fairly new to glsl. I have used it in the past to alter shaders that come stock with Processing and Max MSP, but I haven’t really started a shader from scratch, to accomplish a specific goal. I’ve been working through the Orange Book, picking apart some stuff at shadertoy, etc. What I want to do now is create an effect (2d) that emulates ink spreading across paper.
When wet ink is laid on paper, the color begins to spread outwards at uneven rates, creating an asymmetrical shape with some sort of capillary effect. I have been trying to break down the process behind this to start using glsl for it, and here is what I have roughly thought up:
Since the ink spreads at uneven rates, a random value could be applied to each fragment, representing the “mass” of the ink. From what I understand, this might be appropriate to do in the vertex shader, and then pass on to the fragment shader. Once that is calculated, the ink will begin to spread, which will mean each drop will spread outwards, with the “mass” decreasing with each degree of spread.
Does anyone have any advice for taking this on? Are there similar shaders that I could pick apart to understand this better? Are there any issues I will come across with the method I’ve described? From what I can think of, a have a gap in my understanding of how the map of “mass” for each pixel will be used efficiently in the fragment shader.
Thank you all!