I was so lazy yesterday, I haven't done anything at all. Today I have continued with adding the Channel Material to the OpenGL-part of the program. The first step to use the Channel Material is to evaluate the graph of operators and build some structures. As I know, that the graph has no loops as I simply don't allow them (the program currently doesn't make any checks if there are any, though), I can evaluate the operators in a sequence, so that the input values of any operator are available when I evaluate it.
That means the first structure I need is a list of operators. This list defines in what sequence the operators are evaluated. As it only contains operators reachable from the output operator, it also means that I can add as many dummy operators as I like to the material, evaluation will not suffer. I think that is an important aspect as it allows to play with alternatives.
The second structure is the size of the necessary state. The state is the sum over all output values and the input values to the channel shader. The input values are things like the uv-coordinates, the 3D position and the normal of the point where we want to evaluate the shader. What the evaluation step has to do besides creating the list of operators is to tell each operator where it shall store its output and where it can find its input. All inputs which are not connected will receive a default position to read, so a pin for 2d-coordinates will receive the original texture coordinates. For channel types where there is no input, e.g. the color, I will create dummy places filled with some default value, e.g. black for the color or 0 for the intensity.
It slowly becomes a tradition to be late. So here comes the review of March. Channel MaterialThe channel material is still unfinished. But it saw quite a bit of progress in March. I started with implementing the OpenGL version of the renderer. It tur
Tracked: Apr 09, 22:34