public bool ComputeMulti(ref RenderTexture[] renderTextures, ref ComputeBuffer maskBuffer, float seedParent, bool first = false) { TC_Compute compute = TC_Compute.instance; bool didCompute = false; float seedTotal = seed + seedParent; ComputeBuffer layerBuffer = selectNodeGroup.ComputeValue(seedTotal); if (layerBuffer != null) { didCompute = true; TC_Compute.InitPreviewRenderTexture(ref rtPreview, "rtPreview_Layer"); if (maskNodeGroup.active) { maskBuffer = maskNodeGroup.ComputeValue(seedTotal); } TC_Compute.InitPreviewRenderTexture(ref selectNodeGroup.rtColorPreview, "rtNodeGroupPreview_" + TC.outputNames[outputId]); if (outputId == TC.colorOutput) { compute.RunColorCompute(selectNodeGroup, selectItemGroup, ref renderTextures[0], ref layerBuffer); } else { compute.RunSplatCompute(selectNodeGroup, selectItemGroup, ref renderTextures, ref layerBuffer); } compute.DisposeBuffer(ref layerBuffer); if (maskBuffer != null) { TC_Reporter.Log("Run layer select * mask"); if (method != Method.Lerp || first) { if (outputId == TC.colorOutput) { compute.RunComputeColorMethod(this, ref renderTextures[0], maskBuffer, rtPreview); } else { compute.RunComputeMultiMethod(this, doNormalize, ref renderTextures, maskBuffer, rtPreview); } } rtDisplay = rtPreview; } else { TC_Reporter.Log("No mask buffer assign colorPreviewTex to layer"); rtDisplay = selectNodeGroup.rtColorPreview; } } return(didCompute); }