MaterialX 1.39.1
|
Class related to holding information for shader stages. More...
#include <MaterialXGenShader/Export.h>
#include <MaterialXGenShader/GenOptions.h>
#include <MaterialXGenShader/ShaderGraph.h>
#include <MaterialXGenShader/Syntax.h>
#include <MaterialXFormat/File.h>
#include <MaterialXCore/Node.h>
#include <sstream>
Go to the source code of this file.
Classes | |
class | VariableBlock |
A block of variables in a shader stage. More... | |
class | ShaderStage |
A shader stage, containing the state and resulting source code for the stage. More... | |
struct | ShaderStage::Scope |
Macros | |
#define | DEFINE_SHADER_STAGE(stage, name) if (stage.getName() == name) |
#define | BEGIN_SHADER_STAGE(stage, name) |
#define | END_SHADER_STAGE(stage, name) } |
Typedefs | |
using | VariableBlockPtr = std::shared_ptr< VariableBlock > |
Shared pointer to a VariableBlock. | |
using | VariableBlockMap = std::unordered_map< string, VariableBlockPtr > |
Shared pointer to a map between string identifiers and VariableBlocks. | |
using | ShaderPortPredicate = std::function< bool(ShaderPort *)> |
A standard function predicate taking an ShaderPort pointer and returning a boolean. | |
using | ShaderStagePtr = std::shared_ptr< ShaderStage > |
Shared pointer to a ShaderStage. | |
Functions | |
ShaderPort * | addStageUniform (const string &block, TypeDesc type, const string &name, ShaderStage &stage) |
Utility function for adding a new shader port to a uniform block. | |
ShaderPort * | addStageUniform (const string &block, const TypeDesc *type, const string &name, ShaderStage &stage) |
ShaderPort * | addStageInput (const string &block, TypeDesc type, const string &name, ShaderStage &stage, bool shouldWiden=false) |
Utility function for adding a new shader port to an input block. | |
ShaderPort * | addStageInput (const string &block, const TypeDesc *type, const string &name, ShaderStage &stage, bool shouldWiden=false) |
ShaderPort * | addStageOutput (const string &block, TypeDesc type, const string &name, ShaderStage &stage, bool shouldWiden=false) |
Utility function for adding a new shader port to an output block. | |
ShaderPort * | addStageOutput (const string &block, const TypeDesc *type, const string &name, ShaderStage &stage, bool shouldWiden=false) |
void | addStageConnectorBlock (const string &block, const string &instance, ShaderStage &from, ShaderStage &to) |
Utility function for adding a connector block between stages. | |
void | addStageConnector (const string &block, TypeDesc type, const string &name, ShaderStage &from, ShaderStage &to, bool shouldWiden=false) |
Utility function for adding a variable to a stage connector block. | |
void | addStageConnector (const string &block, const TypeDesc *type, const string &name, ShaderStage &from, ShaderStage &to, bool shouldWiden=false) |
Variables | |
MX_GENSHADER_API const string | PIXEL |
Identifier for pixel stage. More... | |
Class related to holding information for shader stages.
#define BEGIN_SHADER_STAGE | ( | stage, | |
name | |||
) |
|
extern |
Identifier for pixel stage.
This is the main stage used by all shader targets. For single stage shader targets this is the one and only stage. Shader targets with multiple stages can add additional stage identifiers to the Stage namespace.