
510 VII 3D Engine Design
struct FunctionDefinition
{
set<string> InSemantic ;
set<string> OutSemantic ;
set<string> InOutSemantic ;
} ;
Listing 2.2. FunctionDefinition structure.
2.5 Algorithm Explanation
The algorithm used to generate the shader is inspired by the A* path-finding
algorithm [Wikipedia 15a]. The idea is to find a path from the required output
semantic to the existing input semantics, i.e., the vertex attributes. The path is
searched using open and closed semantic sets, in the same way as the open and
closed node lists of the original algorithm. To successfully generate the code, the
compiler must be provided the following information:
• the