Generator - digitalShaman/ImageSynth GitHub Wiki
A Generators main task is to generate a value between 0 and 1 for a given x/y coordinate.
This is implemented in Function Evaluate(x As Double, y As Double) As Double
.
Depending on the goal of the gerenator, it may take more input data in the form of parameters. A generator may define any number of parameters. The main program gets information about paramters through ReadOnly Property ParameterInfos As DataTable
.
Parameters are displayed in the GUI on the left side of the function box. Their value can be fixed or set by another generator/function.
The main program informs the generator about parameter value changes via Sub SetParameterValue(Index As Integer, Value As Double)
and Sub AddParameterValue(Index As Integer, Value As Double)
.
A Generator or Function must implement Sub AddOpenGlCode(ByRef DeclareCode As String, ByRef InitCode As String, ByRef ExecuteCode As String, AnySolo As Boolean)
adding meaningful shader code to a basic OpenGL shader skelleton to work in OpenGl view. (Note that the Scratches generator does not implement OpenGL code - i have not yet found a good way to store the scrates)