void Process() { GLTextuer2D i1 = (GLTextuer2D)input.Input.Data; GLTextuer2D i2 = (GLTextuer2D)input2.Input.Data; if (i1 == null || i1.Id == 0) { return; } if (i2 == null || i2.Id == 0) { return; } CreateBufferIfNeeded(); processor.TileX = tileX; processor.TileY = TileY; processor.RedChannel = (int)predChannel; processor.GreenChannel = (int)pgreenChannel; processor.BlueChannel = (int)pblueChannel; processor.AlphaChannel = (int)palphaChannel; processor.Process(width, height, i1, i2, buffer); processor.Complete(); output.Data = buffer; output.Changed(); Updated(); }
void Process() { GLTextuer2D i1 = (GLTextuer2D)input.Input.Data; GLTextuer2D i2 = (GLTextuer2D)input2.Input.Data; if (i1 == null || i1.Id == 0) { return; } if (i2 == null || i2.Id == 0) { return; } CreateBufferIfNeeded(); processor.TileX = tileX; processor.TileY = TileY; int predChannel = redChannel; int pgreenChannel = greenChannel; int pblueChannel = blueChannel; int palphaChannel = alphaChannel; if (ParentGraph != null) { if (ParentGraph.HasParameterValue(Id, "RedChannel")) { predChannel = Convert.ToInt32(ParentGraph.GetParameterValue(Id, "RedChannel")); } if (ParentGraph.HasParameterValue(Id, "GreenChannel")) { pgreenChannel = Convert.ToInt32(ParentGraph.GetParameterValue(Id, "GreenChannel")); } if (ParentGraph.HasParameterValue(Id, "BlueChannel")) { pblueChannel = Convert.ToInt32(ParentGraph.GetParameterValue(Id, "BlueChannel")); } if (ParentGraph.HasParameterValue(Id, "AlphaChannel")) { palphaChannel = Convert.ToInt32(ParentGraph.GetParameterValue(Id, "AlphaChannel")); } } processor.RedChannel = predChannel; processor.GreenChannel = pgreenChannel; processor.BlueChannel = pblueChannel; processor.AlphaChannel = palphaChannel; processor.Process(width, height, i1, i2, buffer); processor.Complete(); output.Data = buffer; output.Changed(); Updated(); }