Property | Type | Description | |
---|---|---|---|
FilePath | string | ||
Hash1 | string | ||
NextUID | int | ||
Output | |||
OutputPos |
Method | Description | |
---|---|---|
AddNode ( |
||
Clone ( int idOffset ) : |
||
GenerateShader ( string shaderName, Action |
Generates a shader with customized output.
|
|
GenerateShader ( string shaderName, string colorRampParamName ) : string |
Generates a shader that outputs a color based on the graph's noise and a color ramp texture.
|
|
GenerateShader ( string shaderName, string outputs, float defaultVal ) : string |
Generates a shader that outputs this graph's noise in the given channels.
|
|
GetNode ( int uid ) : |
Returns "null" if the given Node uid doesn't exist in this graph.
|
|
GetObjectData ( |
||
Graph ( ) : System | ||
Graph ( |
||
Graph ( string file, bool isGUID = false ) : System |
Creates a graph for the given file path/GUID.
|
|
InsertShaderCode ( StringBuilder shaderProperties, StringBuilder shaderCGDefines, StringBuilder shaderBody, int idOffset, bool isFirstGraph ) : string |
Inserts code for this graph into the given strings, and outputs an expression that evaluates to the output of this graph.
|
|
IsValidUID ( int uid ) : bool | ||
Load ( ) : string |
Re-loads this graph from its file-path, effectively wiping out any changes to it. Returns an error message, or an empty string if nothing went wrong.
|
|
PreProcess ( ) : void |
Simplifies this graph by running its nodes through the pre-processing stage. The whole graph will be reduced to its final form (i.e. no "weird" nodes like SubGraphNode).
|
|
RemoveNode ( |
||
Save ( ) : string |
Saves this graph to its file-path. Returns an error message, or an empty string if nothing went wrong.
|
Method | Description | |
---|---|---|
FinalizeDeserialization ( |
||
InsertShad ( StringBuilder properties, StringBuilder cgProperties, StringBuilder body, bool addDefines ) : string |
public AddNode ( |
||
n | ||
generateNewUID | bool | |
return | void |
public GenerateShader ( string shaderName, Action |
||
shaderName | string | The shader's name in the file. |
addToProperties | Action |
Adds any Unity Shaderlab Properties to the given string. |
addToDefs | Action |
Adds any Cg declarations to the given string. |
returnFragmentColor | StringBuilder>.Action | /// Outupts shader instructions that return a float4 color /// given the variable holding the graph's noise output. /// |
return | string |
public GenerateShader ( string shaderName, string colorRampParamName ) : string | ||
shaderName | string | The shader's name in the file. |
colorRampParamName | string | |
return | string |
public GenerateShader ( string shaderName, string outputs, float defaultVal ) : string | ||
shaderName | string | The shader's name in the file. |
outputs | string | The channels to output this graph's noise into. |
defaultVal | float | /// The value held by channels that didn't receive this graph's noise. /// |
return | string |
public GetObjectData ( |
||
info | ||
context | ||
return | void |
public Graph ( |
||
info | ||
context | ||
return | System |
public Graph ( string file, bool isGUID = false ) : System | ||
file | string | |
isGUID | bool | |
return | System |
public InsertShaderCode ( StringBuilder shaderProperties, StringBuilder shaderCGDefines, StringBuilder shaderBody, int idOffset, bool isFirstGraph ) : string | ||
shaderProperties | StringBuilder | |
shaderCGDefines | StringBuilder | |
shaderBody | StringBuilder | |
idOffset | int | /// Offsets the ids of the nodes in this graph /// so that they do not conflict with the ID's of any other nodes in other graphs used by this shader. /// This offset should be larger than any ID of a node in any other graph. /// |
isFirstGraph | bool | /// Indicates whether this is the first time that /// generated code from a Graph is being inserted into this shader. /// If true, certain function definitions will be included into the shader code. /// |
return | string |