|
Developer Documentation
|
Classes | |
| struct | DefaultIODesc |
| struct | Keywords |
Public Member Functions | |
| void | setGLSLVersion (int _version) |
| Set glsl version. | |
| void | addIncludeFile (QString _fileName) |
| Imports another shader, same as #include. | |
| void | initVertexShaderIO (const ShaderGenDesc *_desc, const DefaultIODesc *_iodesc) |
| Adds fitting vertex shader io for a given description. | |
| void | initTessControlShaderIO (const ShaderGenDesc *_desc, ShaderGenerator *_prevStage, const DefaultIODesc *_iodesc) |
| Adds fitting tess-control shader io for a given description. | |
| void | initTessEvalShaderIO (const ShaderGenDesc *_desc, ShaderGenerator *_prevStage, const DefaultIODesc *_iodesc) |
| Adds fitting tess-evaluation shader io for a given description. | |
| void | initGeometryShaderIO (const ShaderGenDesc *_desc, ShaderGenerator *_prevStage, const DefaultIODesc *_iodesc) |
| Adds fitting geometry shader io for a given description. | |
| void | initFragmentShaderIO (const ShaderGenDesc *_desc, ShaderGenerator *_prevStage, const DefaultIODesc *_iodesc) |
| Adds fitting fragment shader io for a given description. | |
| void | initDefaultUniforms () |
| Adds frequently used uniform parameters. More... | |
| void | addInput (const QString &_input) |
| Add one GLSL input specifier. More... | |
| void | addInput (const QString &_type, const QString &_varname) |
| Add one GLSL input specifier. More... | |
| void | addOutput (const QString &_output) |
| Add one GLSL output specifier. More... | |
| void | addOutput (const QString &_type, const QString &_varname) |
| Add one GLSL output specifier. More... | |
| void | addUniform (QString _uniform, QString _comment="") |
| Add one GLSL uniform specifier. More... | |
| void | addDefine (const QString &_define) |
| Add one define. More... | |
| void | addIODefine (const QString &_macroName, const QString &_resolvedName) |
| Assign an opaque name to the abstract macro. More... | |
| void | addMacros (const QStringList &_macros) |
| Add a list of preprocessor macros. More... | |
| bool | hasDefine (QString _define) const |
| Check for define. More... | |
| void | addLayout (QString _layout) |
| Add a layout directive. More... | |
| void | addRawIOBlock (QStringList _codeBlock) |
| Add a raw glsl IO code block. More... | |
| void | addLight (int lightIndex_, ShaderGenLightType _light) |
| Add a light description to shader: | |
| void | buildShaderCode (QStringList *_pMainCode, const QStringList &_defaultLightingFunctions) |
| Shader assembly function. More... | |
| const QStringList & | getShaderCode () |
| Get result of buildShaderCode. | |
| void | saveToFile (const char *_fileName) |
| Save generated shader code to text file. More... | |
| void | matchInputs (const ShaderGenerator *_previousShaderStage, bool _passToNextStage, QString _inputPrefix="outVertex", QString _outputPrefix="outGeometry") |
| Perform name matching of outputs and inputs between two shader stages. More... | |
| void | defineIOAbstraction (const DefaultIODesc *_iodesc, bool _vs, bool _fs) |
| Define abstract IO names via shader defines. More... | |
| int | getNumOutputs () const |
| get number of outputs | |
| QString | getOutputName (int _id) const |
| get variable name of output More... | |
| int | getNumInputs () const |
| get number of inputs | |
| QString | getInputName (int _id) const |
| get variable name of input More... | |
| QString | getIOMapName (int _inId) const |
| get corresponding output name of an input id More... | |
| void | setGLSLVersion (int _version) |
| Set glsl version. | |
| void | addIncludeFile (QString _fileName) |
| Imports another shader, same as #include. | |
| void | initVertexShaderIO (const ShaderGenDesc *_desc, const DefaultIODesc *_iodesc) |
| Adds fitting vertex shader io for a given description. | |
| void | initTessControlShaderIO (const ShaderGenDesc *_desc, ShaderGenerator *_prevStage, const DefaultIODesc *_iodesc) |
| Adds fitting tess-control shader io for a given description. | |
| void | initTessEvalShaderIO (const ShaderGenDesc *_desc, ShaderGenerator *_prevStage, const DefaultIODesc *_iodesc) |
| Adds fitting tess-evaluation shader io for a given description. | |
| void | initGeometryShaderIO (const ShaderGenDesc *_desc, ShaderGenerator *_prevStage, const DefaultIODesc *_iodesc) |
| Adds fitting geometry shader io for a given description. | |
| void | initFragmentShaderIO (const ShaderGenDesc *_desc, ShaderGenerator *_prevStage, const DefaultIODesc *_iodesc) |
| Adds fitting fragment shader io for a given description. | |
| void | initDefaultUniforms () |
| Adds frequently used uniform parameters. More... | |
| void | addInput (const QString &_input) |
| Add one GLSL input specifier. More... | |
| void | addInput (const QString &_type, const QString &_varname) |
| Add one GLSL input specifier. More... | |
| void | addOutput (const QString &_output) |
| Add one GLSL output specifier. More... | |
| void | addOutput (const QString &_type, const QString &_varname) |
| Add one GLSL output specifier. More... | |
| void | addUniform (QString _uniform, QString _comment="") |
| Add one GLSL uniform specifier. More... | |
| void | addDefine (const QString &_define) |
| Add one define. More... | |
| void | addIODefine (const QString &_macroName, const QString &_resolvedName) |
| Assign an opaque name to the abstract macro. More... | |
| void | addMacros (const QStringList &_macros) |
| Add a list of preprocessor macros. More... | |
| bool | hasDefine (QString _define) const |
| Check for define. More... | |
| void | addLayout (QString _layout) |
| Add a layout directive. More... | |
| void | addRawIOBlock (QStringList _codeBlock) |
| Add a raw glsl IO code block. More... | |
| void | addLight (int lightIndex_, ShaderGenLightType _light) |
| Add a light description to shader: | |
| void | buildShaderCode (QStringList *_pMainCode, const QStringList &_defaultLightingFunctions) |
| Shader assembly function. More... | |
| const QStringList & | getShaderCode () |
| Get result of buildShaderCode. | |
| void | saveToFile (const char *_fileName) |
| Save generated shader code to text file. More... | |
| void | matchInputs (const ShaderGenerator *_previousShaderStage, bool _passToNextStage, QString _inputPrefix="outVertex", QString _outputPrefix="outGeometry") |
| Perform name matching of outputs and inputs between two shader stages. More... | |
| void | defineIOAbstraction (const DefaultIODesc *_iodesc, bool _vs, bool _fs) |
| Define abstract IO names via shader defines. More... | |
| int | getNumOutputs () const |
| get number of outputs | |
| QString | getOutputName (int _id) const |
| get variable name of output More... | |
| int | getNumInputs () const |
| get number of inputs | |
| QString | getInputName (int _id) const |
| get variable name of input More... | |
| QString | getIOMapName (int _inId) const |
| get corresponding output name of an input id More... | |
| void | setGLSLVersion (int _version) |
| Set glsl version. | |
| void | addIncludeFile (QString _fileName) |
| Imports another shader, same as #include. | |
| void | initVertexShaderIO (const ShaderGenDesc *_desc, const DefaultIODesc *_iodesc) |
| Adds fitting vertex shader io for a given description. | |
| void | initTessControlShaderIO (const ShaderGenDesc *_desc, ShaderGenerator *_prevStage, const DefaultIODesc *_iodesc) |
| Adds fitting tess-control shader io for a given description. | |
| void | initTessEvalShaderIO (const ShaderGenDesc *_desc, ShaderGenerator *_prevStage, const DefaultIODesc *_iodesc) |
| Adds fitting tess-evaluation shader io for a given description. | |
| void | initGeometryShaderIO (const ShaderGenDesc *_desc, ShaderGenerator *_prevStage, const DefaultIODesc *_iodesc) |
| Adds fitting geometry shader io for a given description. | |
| void | initFragmentShaderIO (const ShaderGenDesc *_desc, ShaderGenerator *_prevStage, const DefaultIODesc *_iodesc) |
| Adds fitting fragment shader io for a given description. | |
| void | initDefaultUniforms () |
| Adds frequently used uniform parameters. More... | |
| void | addInput (const QString &_input) |
| Add one GLSL input specifier. More... | |
| void | addInput (const QString &_type, const QString &_varname) |
| Add one GLSL input specifier. More... | |
| void | addOutput (const QString &_output) |
| Add one GLSL output specifier. More... | |
| void | addOutput (const QString &_type, const QString &_varname) |
| Add one GLSL output specifier. More... | |
| void | addUniform (QString _uniform, QString _comment="") |
| Add one GLSL uniform specifier. More... | |
| void | addDefine (const QString &_define) |
| Add one define. More... | |
| void | addIODefine (const QString &_macroName, const QString &_resolvedName) |
| Assign an opaque name to the abstract macro. More... | |
| void | addMacros (const QStringList &_macros) |
| Add a list of preprocessor macros. More... | |
| bool | hasDefine (QString _define) const |
| Check for define. More... | |
| void | addLayout (QString _layout) |
| Add a layout directive. More... | |
| void | addRawIOBlock (QStringList _codeBlock) |
| Add a raw glsl IO code block. More... | |
| void | addLight (int lightIndex_, ShaderGenLightType _light) |
| Add a light description to shader: | |
| void | buildShaderCode (QStringList *_pMainCode, const QStringList &_defaultLightingFunctions) |
| Shader assembly function. More... | |
| const QStringList & | getShaderCode () |
| Get result of buildShaderCode. | |
| void | saveToFile (const char *_fileName) |
| Save generated shader code to text file. More... | |
| void | matchInputs (const ShaderGenerator *_previousShaderStage, bool _passToNextStage, QString _inputPrefix="outVertex", QString _outputPrefix="outGeometry") |
| Perform name matching of outputs and inputs between two shader stages. More... | |
| void | defineIOAbstraction (const DefaultIODesc *_iodesc, bool _vs, bool _fs) |
| Define abstract IO names via shader defines. More... | |
| int | getNumOutputs () const |
| get number of outputs | |
| QString | getOutputName (int _id) const |
| get variable name of output More... | |
| int | getNumInputs () const |
| get number of inputs | |
| QString | getInputName (int _id) const |
| get variable name of input More... | |
| QString | getIOMapName (int _inId) const |
| get corresponding output name of an input id More... | |
Static Public Attributes | |
| static const Keywords | keywords |
Private Member Functions | |
| void | addStringToList (QString _str, QStringList *_list, QString _prefix="", QString _postfix="") |
| void | addIOToCode (const QStringList &_cmds) |
| void | addStringToList (QString _str, QStringList *_list, QString _prefix="", QString _postfix="") |
| void | addIOToCode (const QStringList &_cmds) |
| void | addStringToList (QString _str, QStringList *_list, QString _prefix="", QString _postfix="") |
| void | addIOToCode (const QStringList &_cmds) |
Private Attributes | |
| QStringList | code_ |
| QStringList | imports_ |
| glsl code imports (with #include ) | |
| int | version_ |
| QStringList | inputs_ |
| QStringList | outputs_ |
| QStringList | uniforms_ |
| QStringList | genDefines_ |
| QStringList | layouts_ |
| QStringList | rawIO_ |
| io block as glsl code | |
| bool | inputArrays_ |
| inputs of shader are arrays (tess-control, tess-eval, geometry) | |
| bool | outputArrays_ |
| outputs of shader are arrays (tess-control) | |
| QString | inputPrefix_ |
| prefix of inputs to this shader, same as prefix of ouputs of previous stage | |
| QString | outputPrefix_ |
| prefix of outputs of this shader | |
The ShaderGenerator is used to collect shader io, uniforms, defines and includes.
The shader main-function is not generated here and must be provided as a parameter to the buildShaderCode function.
Definition at line 524 of file MeshNode2T.cc.
| void ACG::SceneGraph::ACG::ShaderGenerator::addDefine | ( | const QString & | _define | ) |
Add one define.
Example:
| void ACG::SceneGraph::ACG::ShaderGenerator::addDefine | ( | const QString & | _define | ) |
Add one define.
Example:
| void ACG::SceneGraph::ACG::ShaderGenerator::addDefine | ( | const QString & | _define | ) |
Add one define.
Example:
| void ACG::SceneGraph::ACG::ShaderGenerator::addInput | ( | const QString & | _input | ) |
| void ACG::SceneGraph::ACG::ShaderGenerator::addInput | ( | const QString & | _input | ) |
| void ACG::SceneGraph::ACG::ShaderGenerator::addInput | ( | const QString & | _input | ) |
|
inline |
Add one GLSL input specifier.
Stores string pointer only Example:
Definition at line 606 of file MeshNode2T.cc.
|
inline |
Add one GLSL input specifier.
Stores string pointer only Example:
Definition at line 606 of file MeshNode2T.cc.
|
inline |
Add one GLSL input specifier.
Stores string pointer only Example:
Definition at line 606 of file MeshNode2T.cc.
| void ACG::SceneGraph::ACG::ShaderGenerator::addIODefine | ( | const QString & | _macroName, |
| const QString & | _resolvedName | ||
| ) |
Assign an opaque name to the abstract macro.
| void ACG::SceneGraph::ACG::ShaderGenerator::addIODefine | ( | const QString & | _macroName, |
| const QString & | _resolvedName | ||
| ) |
Assign an opaque name to the abstract macro.
| void ACG::SceneGraph::ACG::ShaderGenerator::addIODefine | ( | const QString & | _macroName, |
| const QString & | _resolvedName | ||
| ) |
Assign an opaque name to the abstract macro.
|
private |
Adds command lines to the shader code. Eventually appends missing ';'
|
private |
Adds command lines to the shader code. Eventually appends missing ';'
|
private |
Adds command lines to the shader code. Eventually appends missing ';'
| void ACG::SceneGraph::ACG::ShaderGenerator::addLayout | ( | QString | _layout | ) |
Add a layout directive.
Example:
| void ACG::SceneGraph::ACG::ShaderGenerator::addLayout | ( | QString | _layout | ) |
Add a layout directive.
Example:
| void ACG::SceneGraph::ACG::ShaderGenerator::addLayout | ( | QString | _layout | ) |
Add a layout directive.
Example:
| void ACG::SceneGraph::ACG::ShaderGenerator::addMacros | ( | const QStringList & | _macros | ) |
Add a list of preprocessor macros.
| void ACG::SceneGraph::ACG::ShaderGenerator::addMacros | ( | const QStringList & | _macros | ) |
Add a list of preprocessor macros.
| void ACG::SceneGraph::ACG::ShaderGenerator::addMacros | ( | const QStringList & | _macros | ) |
Add a list of preprocessor macros.
| void ACG::SceneGraph::ACG::ShaderGenerator::addOutput | ( | const QString & | _output | ) |
| void ACG::SceneGraph::ACG::ShaderGenerator::addOutput | ( | const QString & | _output | ) |
| void ACG::SceneGraph::ACG::ShaderGenerator::addOutput | ( | const QString & | _output | ) |
|
inline |
Add one GLSL output specifier.
Stores string pointer only Example:
Definition at line 626 of file MeshNode2T.cc.
|
inline |
Add one GLSL output specifier.
Stores string pointer only Example:
Definition at line 626 of file MeshNode2T.cc.
|
inline |
Add one GLSL output specifier.
Stores string pointer only Example:
Definition at line 626 of file MeshNode2T.cc.
|
inline |
Add a raw glsl IO code block.
This code block is inserted between the generated IO block and the main function.
Example:
Definition at line 691 of file MeshNode2T.cc.
|
inline |
Add a raw glsl IO code block.
This code block is inserted between the generated IO block and the main function.
Example:
Definition at line 691 of file MeshNode2T.cc.
|
inline |
Add a raw glsl IO code block.
This code block is inserted between the generated IO block and the main function.
Example:
Definition at line 691 of file MeshNode2T.cc.
|
private |
aborts if string already present prefix, postfix functionality is very basic: only checks for occurrence and disregards location
|
private |
aborts if string already present prefix, postfix functionality is very basic: only checks for occurrence and disregards location
|
private |
aborts if string already present prefix, postfix functionality is very basic: only checks for occurrence and disregards location
| void ACG::SceneGraph::ACG::ShaderGenerator::addUniform | ( | QString | _uniform, |
| QString | _comment = "" |
||
| ) |
| void ACG::SceneGraph::ACG::ShaderGenerator::addUniform | ( | QString | _uniform, |
| QString | _comment = "" |
||
| ) |
| void ACG::SceneGraph::ACG::ShaderGenerator::addUniform | ( | QString | _uniform, |
| QString | _comment = "" |
||
| ) |
| void ACG::SceneGraph::ACG::ShaderGenerator::buildShaderCode | ( | QStringList * | _pMainCode, |
| const QStringList & | _defaultLightingFunctions | ||
| ) |
Shader assembly function.
Also scans shader code for references to default lighting functions LitPointLight(), LitDirLight(), LitSpotLight() and eventually adds these to the shader.
| void ACG::SceneGraph::ACG::ShaderGenerator::buildShaderCode | ( | QStringList * | _pMainCode, |
| const QStringList & | _defaultLightingFunctions | ||
| ) |
Shader assembly function.
Also scans shader code for references to default lighting functions LitPointLight(), LitDirLight(), LitSpotLight() and eventually adds these to the shader.
| void ACG::SceneGraph::ACG::ShaderGenerator::buildShaderCode | ( | QStringList * | _pMainCode, |
| const QStringList & | _defaultLightingFunctions | ||
| ) |
Shader assembly function.
Also scans shader code for references to default lighting functions LitPointLight(), LitDirLight(), LitSpotLight() and eventually adds these to the shader.
| void ACG::SceneGraph::ACG::ShaderGenerator::defineIOAbstraction | ( | const DefaultIODesc * | _iodesc, |
| bool | _vs, | ||
| bool | _fs | ||
| ) |
Define abstract IO names via shader defines.
Default shader inputs and outputs can be conveniently accessed via SG_INPUT_X and SG_OUTPUT_X defines without having to worry about the combinatoric problem of shader stages. For example, in a fragment-shader view-space normals can always be accessed via SG_INPUT_NORMALVS, regardless whether there is a geometry shader or not.
| _iodesc | shader IO descriptor |
| _vs | IO abstraction for vertex shader |
| _fs | IO abstraction for fragment shader |
| void ACG::SceneGraph::ACG::ShaderGenerator::defineIOAbstraction | ( | const DefaultIODesc * | _iodesc, |
| bool | _vs, | ||
| bool | _fs | ||
| ) |
Define abstract IO names via shader defines.
Default shader inputs and outputs can be conveniently accessed via SG_INPUT_X and SG_OUTPUT_X defines without having to worry about the combinatoric problem of shader stages. For example, in a fragment-shader view-space normals can always be accessed via SG_INPUT_NORMALVS, regardless whether there is a geometry shader or not.
| _iodesc | shader IO descriptor |
| _vs | IO abstraction for vertex shader |
| _fs | IO abstraction for fragment shader |
| void ACG::SceneGraph::ACG::ShaderGenerator::defineIOAbstraction | ( | const DefaultIODesc * | _iodesc, |
| bool | _vs, | ||
| bool | _fs | ||
| ) |
Define abstract IO names via shader defines.
Default shader inputs and outputs can be conveniently accessed via SG_INPUT_X and SG_OUTPUT_X defines without having to worry about the combinatoric problem of shader stages. For example, in a fragment-shader view-space normals can always be accessed via SG_INPUT_NORMALVS, regardless whether there is a geometry shader or not.
| _iodesc | shader IO descriptor |
| _vs | IO abstraction for vertex shader |
| _fs | IO abstraction for fragment shader |
| QString ACG::SceneGraph::ACG::ShaderGenerator::getInputName | ( | int | _id | ) | const |
get variable name of input
| _id | zero based index of input |
| QString ACG::SceneGraph::ACG::ShaderGenerator::getInputName | ( | int | _id | ) | const |
get variable name of input
| _id | zero based index of input |
| QString ACG::SceneGraph::ACG::ShaderGenerator::getInputName | ( | int | _id | ) | const |
get variable name of input
| _id | zero based index of input |
| QString ACG::SceneGraph::ACG::ShaderGenerator::getIOMapName | ( | int | _inId | ) | const |
get corresponding output name of an input id
| _inId | zero-based index of input id |
| QString ACG::SceneGraph::ACG::ShaderGenerator::getIOMapName | ( | int | _inId | ) | const |
get corresponding output name of an input id
| _inId | zero-based index of input id |
| QString ACG::SceneGraph::ACG::ShaderGenerator::getIOMapName | ( | int | _inId | ) | const |
get corresponding output name of an input id
| _inId | zero-based index of input id |
| QString ACG::SceneGraph::ACG::ShaderGenerator::getOutputName | ( | int | _id | ) | const |
get variable name of output
| _id | zero based index of output |
| QString ACG::SceneGraph::ACG::ShaderGenerator::getOutputName | ( | int | _id | ) | const |
get variable name of output
| _id | zero based index of output |
| QString ACG::SceneGraph::ACG::ShaderGenerator::getOutputName | ( | int | _id | ) | const |
get variable name of output
| _id | zero based index of output |
| bool ACG::SceneGraph::ACG::ShaderGenerator::hasDefine | ( | QString | _define | ) | const |
| bool ACG::SceneGraph::ACG::ShaderGenerator::hasDefine | ( | QString | _define | ) | const |
| bool ACG::SceneGraph::ACG::ShaderGenerator::hasDefine | ( | QString | _define | ) | const |
| void ACG::SceneGraph::ACG::ShaderGenerator::initDefaultUniforms | ( | ) |
Adds frequently used uniform parameters.
Adds frequently used uniform parameters like:
| void ACG::SceneGraph::ACG::ShaderGenerator::initDefaultUniforms | ( | ) |
Adds frequently used uniform parameters.
Adds frequently used uniform parameters like:
| void ACG::SceneGraph::ACG::ShaderGenerator::initDefaultUniforms | ( | ) |
Adds frequently used uniform parameters.
Adds frequently used uniform parameters like:
| void ACG::SceneGraph::ACG::ShaderGenerator::matchInputs | ( | const ShaderGenerator * | _previousShaderStage, |
| bool | _passToNextStage, | ||
| QString | _inputPrefix = "outVertex", |
||
| QString | _outputPrefix = "outGeometry" |
||
| ) |
Perform name matching of outputs and inputs between two shader stages.
IO of this shader (for instance fragment-shader) and its previous shader (for instance vertex shader) require matching names. Example: The vertex shader has an output "out vec3 outVertexNormal", then this function simply adds the input "in vec3 outVertexNormal" to the current shader (either a geometry or fragment shader). If this is a geometry shader, _passToNextStage should be set to true so that "out vec3 outGeometryNormal" is also added to the outputs.
| _previousShaderStage | shader of the previous stage, which should have all outputs setup already |
| _passToNextStage | all outputs of the previous shader stage are passed to the next stage (should be false for fragment shader for instance) |
| _inputPrefix | name prefix of inputs to this shader (only necessary if _passToNextStage is true) |
| _outputPrefix | name prefix of outputs of this shader (only necessary if _passToNextStage is true) |
| void ACG::SceneGraph::ACG::ShaderGenerator::matchInputs | ( | const ShaderGenerator * | _previousShaderStage, |
| bool | _passToNextStage, | ||
| QString | _inputPrefix = "outVertex", |
||
| QString | _outputPrefix = "outGeometry" |
||
| ) |
Perform name matching of outputs and inputs between two shader stages.
IO of this shader (for instance fragment-shader) and its previous shader (for instance vertex shader) require matching names. Example: The vertex shader has an output "out vec3 outVertexNormal", then this function simply adds the input "in vec3 outVertexNormal" to the current shader (either a geometry or fragment shader). If this is a geometry shader, _passToNextStage should be set to true so that "out vec3 outGeometryNormal" is also added to the outputs.
| _previousShaderStage | shader of the previous stage, which should have all outputs setup already |
| _passToNextStage | all outputs of the previous shader stage are passed to the next stage (should be false for fragment shader for instance) |
| _inputPrefix | name prefix of inputs to this shader (only necessary if _passToNextStage is true) |
| _outputPrefix | name prefix of outputs of this shader (only necessary if _passToNextStage is true) |
| void ACG::SceneGraph::ACG::ShaderGenerator::matchInputs | ( | const ShaderGenerator * | _previousShaderStage, |
| bool | _passToNextStage, | ||
| QString | _inputPrefix = "outVertex", |
||
| QString | _outputPrefix = "outGeometry" |
||
| ) |
Perform name matching of outputs and inputs between two shader stages.
IO of this shader (for instance fragment-shader) and its previous shader (for instance vertex shader) require matching names. Example: The vertex shader has an output "out vec3 outVertexNormal", then this function simply adds the input "in vec3 outVertexNormal" to the current shader (either a geometry or fragment shader). If this is a geometry shader, _passToNextStage should be set to true so that "out vec3 outGeometryNormal" is also added to the outputs.
| _previousShaderStage | shader of the previous stage, which should have all outputs setup already |
| _passToNextStage | all outputs of the previous shader stage are passed to the next stage (should be false for fragment shader for instance) |
| _inputPrefix | name prefix of inputs to this shader (only necessary if _passToNextStage is true) |
| _outputPrefix | name prefix of outputs of this shader (only necessary if _passToNextStage is true) |
| void ACG::SceneGraph::ACG::ShaderGenerator::saveToFile | ( | const char * | _fileName | ) |
Save generated shader code to text file.
| _fileName | Where to save |
| void ACG::SceneGraph::ACG::ShaderGenerator::saveToFile | ( | const char * | _fileName | ) |
Save generated shader code to text file.
| _fileName | Where to save |
| void ACG::SceneGraph::ACG::ShaderGenerator::saveToFile | ( | const char * | _fileName | ) |
Save generated shader code to text file.
| _fileName | Where to save |