Class ShaderGenerator
Shaders generator from graphs.
Inheritance
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Visject/ShaderGraph.h
Syntax
public class ShaderGenerator
Constructors
~ShaderGenerator()
ShaderGenerator()
Fields
_callStack
Declaration
protected Array<Node* , FixedAllocation<SHADER_GRAPH_MAX_CALL_STACK>> _callStack
Field Value
|
Array<Node , FixedAllocation<SHADER_GRAPH_MAX_CALL_STACK>>
|
_functions
Declaration
protected Dictionary<Node* , Graph* > _functions
Field Value
|
Dictionary<Node , Graph >
|
_graphStack
Declaration
protected Array<Graph* , FixedAllocation<32>> _graphStack
Field Value
|
Array<Graph , FixedAllocation<32>>
|
_includes
Declaration
protected HashSet<String> _includes
Field Value
|
HashSet<String>
|
_localIndex
Declaration
protected int32 _localIndex
Field Value
|
int32
|
_mathFunctions
Declaration
protected static Char* _mathFunctions[]
Field Value
|
Char
|
_parameters
Declaration
protected Array<SerializedMaterialParam> _parameters
Field Value
|
Array<SerializedMaterialParam>
|
_perGroupProcessCall
Declaration
protected Array<ProcessBoxHandler, FixedAllocation<17>> _perGroupProcessCall
Field Value
|
Array<ProcessBoxHandler, FixedAllocation<17>>
|
_subs
Declaration
protected static Char* _subs[]
Field Value
|
Char
|
_writer
Declaration
protected TextWriterUnicode _writer
Field Value
|
TextWriterUnicode
|
Assets
The assets container for graph generation. Holds references to used assets. Can be used to gather assets referenced by graph (eg. nested graph functions).
Declaration
public AssetsContainer Assets
Field Value
|
AssetsContainer
|
Error
Declaration
public ErrorHandler Error
Field Value
|
ErrorHandler
|
Methods
eatBox(Node* caller, Box* box)
Declaration
protected Value eatBox(Node* caller, Box* box)
Parameters
|
Node
caller
|
|
Box
box
|
Returns
|
Value
|
findOrAddCubeTexture(const Guid& id)
Declaration
protected SerializedMaterialParam findOrAddCubeTexture(const Guid& id)
Parameters
|
Guid
id
|
Returns
|
SerializedMaterialParam
|
findOrAddGlobalSDF()
findOrAddNormalMap(const Guid& id)
Declaration
protected SerializedMaterialParam findOrAddNormalMap(const Guid& id)
Parameters
|
Guid
id
|
Returns
|
SerializedMaterialParam
|
findOrAddSceneTexture(MaterialSceneTextures type)
Declaration
protected SerializedMaterialParam findOrAddSceneTexture(MaterialSceneTextures type)
Parameters
|
MaterialSceneTextures
type
|
Returns
|
SerializedMaterialParam
|
findOrAddTexture(const Guid& id)
Declaration
protected SerializedMaterialParam findOrAddTexture(const Guid& id)
Parameters
|
Guid
id
|
Returns
|
SerializedMaterialParam
|
findOrAddTextureGroupSampler(int32 index)
Declaration
protected SerializedMaterialParam findOrAddTextureGroupSampler(int32 index)
Parameters
|
int32
index
|
Returns
|
SerializedMaterialParam
|
findParam(const Guid& id)
Declaration
protected SerializedMaterialParam* findParam(const Guid& id)
Parameters
|
Guid
id
|
Returns
|
SerializedMaterialParam
|
findParam(const String& shaderName)
Declaration
protected SerializedMaterialParam* findParam(const String& shaderName)
Parameters
|
String
shaderName
|
Returns
|
SerializedMaterialParam
|
getLocalName(int32 index)
getParamName(int32 index)
OnError(Node* node, Box* box, const StringView& message)
Declaration
public void OnError(Node* node, Box* box, const StringView& message)
Parameters
|
Node
node
|
|
Box
box
|
|
StringView
message
|
ProcessGroupBitwise(Box* box, Node* node, Value& value)
Declaration
public void ProcessGroupBitwise(Box* box, Node* node, Value& value)
Parameters
|
Box
box
|
|
Node
node
|
|
Value
value
|
ProcessGroupBoolean(Box* box, Node* node, Value& value)
Declaration
public void ProcessGroupBoolean(Box* box, Node* node, Value& value)
Parameters
|
Box
box
|
|
Node
node
|
|
Value
value
|
ProcessGroupComparisons(Box* box, Node* node, Value& value)
Declaration
public void ProcessGroupComparisons(Box* box, Node* node, Value& value)
Parameters
|
Box
box
|
|
Node
node
|
|
Value
value
|
ProcessGroupConstants(Box* box, Node* node, Value& value)
Declaration
public void ProcessGroupConstants(Box* box, Node* node, Value& value)
Parameters
|
Box
box
|
|
Node
node
|
|
Value
value
|
ProcessGroupMath(Box* box, Node* node, Value& value)
Declaration
public void ProcessGroupMath(Box* box, Node* node, Value& value)
Parameters
|
Box
box
|
|
Node
node
|
|
Value
value
|
ProcessGroupPacking(Box* box, Node* node, Value& value)
Declaration
public void ProcessGroupPacking(Box* box, Node* node, Value& value)
Parameters
|
Box
box
|
|
Node
node
|
|
Value
value
|
ProcessGroupTools(Box* box, Node* node, Value& value)
Declaration
public void ProcessGroupTools(Box* box, Node* node, Value& value)
Parameters
|
Box
box
|
|
Node
node
|
|
Value
value
|
tryGetValue(Box* box, const Value& defaultValue)
Declaration
protected Value tryGetValue(Box* box, const Value& defaultValue)
Parameters
|
Box
box
|
|
Value
defaultValue
|
Returns
|
Value
|
tryGetValue(Box* box, const Variant& defaultValue)
Declaration
protected Value tryGetValue(Box* box, const Variant& defaultValue)
Parameters
|
Box
box
|
|
Variant
defaultValue
|
Returns
|
Value
|
tryGetValue(Box* box, int32 defaultValueBoxIndex, const Value& defaultValue)
Declaration
protected Value tryGetValue(Box* box, int32 defaultValueBoxIndex, const Value& defaultValue)
Parameters
|
Box
box
|
|
int32
defaultValueBoxIndex
|
|
Value
defaultValue
|
Returns
|
Value
|
writeFunction1(Node* caller, const Value& valueA, const String& function)
Declaration
protected Value writeFunction1(Node* caller, const Value& valueA, const String& function)
Parameters
|
Node
caller
|
|
Value
valueA
|
|
String
function
|
Returns
|
Value
|
writeFunction2(Node* caller, const Value& valueA, const Value& valueB, const String& function)
Declaration
protected Value writeFunction2(Node* caller, const Value& valueA, const Value& valueB, const String& function)
Parameters
|
Node
caller
|
|
Value
valueA
|
|
Value
valueB
|
|
String
function
|
Returns
|
Value
|
writeFunction2(Node* caller, const Value& valueA, const Value& valueB, const String& function, ValueType resultType)
Declaration
protected Value writeFunction2(Node* caller, const Value& valueA, const Value& valueB, const String& function, ValueType resultType)
Parameters
|
Node
caller
|
|
Value
valueA
|
|
Value
valueB
|
|
String
function
|
|
ValueType
resultType
|
Returns
|
Value
|
writeFunction3(Node* caller, const Value& valueA, const Value& valueB, const Value& valueC, const String& function, ValueType resultType)
Declaration
protected Value writeFunction3(Node* caller, const Value& valueA, const Value& valueB, const Value& valueC, const String& function, ValueType resultType)
Parameters
|
Node
caller
|
|
Value
valueA
|
|
Value
valueB
|
|
Value
valueC
|
|
String
function
|
|
ValueType
resultType
|
Returns
|
Value
|
writeLocal(const Value& value, Node* caller)
Declaration
protected Value writeLocal(const Value& value, Node* caller)
Parameters
|
Value
value
|
|
Node
caller
|
Returns
|
Value
|
writeLocal(ValueType type, const String& value, Node* caller)
Declaration
protected Value writeLocal(ValueType type, const String& value, Node* caller)
Parameters
|
ValueType
type
|
|
String
value
|
|
Node
caller
|
Returns
|
Value
|
writeLocal(ValueType type, const String& value, Node* caller, const String& name)
Declaration
protected Value writeLocal(ValueType type, const String& value, Node* caller, const String& name)
Parameters
|
ValueType
type
|
|
String
value
|
|
Node
caller
|
|
String
name
|
Returns
|
Value
|
writeLocal(ValueType type, const Value& value, Node* caller)
Declaration
protected Value writeLocal(ValueType type, const Value& value, Node* caller)
Parameters
|
ValueType
type
|
|
Value
value
|
|
Node
caller
|
Returns
|
Value
|
writeLocal(ValueType type, Node* caller)
Declaration
protected Value writeLocal(ValueType type, Node* caller)
Parameters
|
ValueType
type
|
|
Node
caller
|
Returns
|
Value
|
writeLocal(ValueType type, Node* caller, const String& name)
Declaration
protected Value writeLocal(ValueType type, Node* caller, const String& name)
Parameters
|
ValueType
type
|
|
Node
caller
|
|
String
name
|
Returns
|
Value
|
writeOperation2(Node* caller, const Value& valueA, const Value& valueB, Char op1)
Declaration
protected Value writeOperation2(Node* caller, const Value& valueA, const Value& valueB, Char op1)
Parameters
|
Node
caller
|
|
Value
valueA
|
|
Value
valueB
|
|
Char
op1
|
Returns
|
Value
|