flowNodeFromShaderStage method

dynamic flowNodeFromShaderStage(
  1. dynamic shaderStage,
  2. dynamic node, [
  3. dynamic output,
  4. dynamic propertyName,
])

Implementation

flowNodeFromShaderStage(shaderStage, node,
    [output, propertyName]) {
  var previousShaderStage = this.shaderStage;

  this.setShaderStage(shaderStage);

  Map flowData = this.flowChildNode(node, output);

  if (propertyName != null) {
    flowData["code"] += "${propertyName} = ${flowData["result"]};\n\t";
  }

  this.flowCode[shaderStage] = this.flowCode[shaderStage] + flowData["code"];

  this.setShaderStage(previousShaderStage);

  return flowData;
}