protected override bool ProcessNode(CommandBuffer cmd) { index++; if (inputs == null || inputs.Count == 0 || index >= inputs.Count || index < 0) { return(false); } output = inputs[index]; return(true); }
void AddAttribute(MixtureAttribute attr, Vector2 uv, Vector4 data, ref Color32[] previewColor) { // Preview color int previewIndex = (int)(uv.x * cache.width + uv.y * cache.height * cache.width); previewColor[previewIndex] = new Color(data.x, data.y, data.z); string attribName = null; switch (attributeType) { case MapAttribute.Normal: attribName = "normal"; break; case MapAttribute.Position: attribName = "position"; break; case MapAttribute.Scale: attribName = "scale"; break; } attr[attribName] = (Vector3)data; }