Add the shader source code to the shader() example
Dear @hx2A,
I should have opened an issue... I know this might not be the correct way of fixing this, but I'll open the PR anyway as a way of not forgetting about it and losing the code I retrieved from the Processing examples, which is used on this documentation item (while in the middle of doing something else).
Feel free to close this and/or to instruct me on how to do it properly, and I'll try at some other time :smile: ... we should probably be discussing this in an issue, sorry!
This is a good idea, we should include the shader code. At a minimum it would make working wish shaders slightly less opaque.
How to include it though? A solution here should also be compatible with what I come up with for unit tests. (Eventually) there will be unit tests based on the example code.
You have explained to me once how the reference is built, using data from Processing... and I suppose there are tables to tweak stuff somewhere.
My first intuition is there should also be a folder with the code for each example, the unit tests would run the sketch code and compare a resulting image with the expected image. Some script would "include" the code into some page source/template or build the final page (which also includes the image). All this would create a complex workflow hard to explain...