generate method

  1. @override
dynamic generate([
  1. dynamic builder,
  2. dynamic output
])
override

Implementation

@override
generate([builder, output]) {
  var type = this.getNodeType(builder);

  if (this.constant == true) {
    return builder.format(this.generateConst(builder), type, output);
  } else {
    var inputType = this.getInputType(builder);

    var nodeUniform =
        builder.getUniformFromNode(this, builder.shaderStage, inputType);
    var propertyName = builder.getPropertyName(nodeUniform);

    return builder.format(propertyName, type, output);
  }
}