Пример #1
0
 /// <summary>
 /// Posts process filled pixel buffers. Call after Fill or FillRows with the same pixel data.
 /// </summary>
 /// <param name="buffers">The buffers.</param>
 /// <param name="width">Width.</param>
 /// <param name="height">Height.</param>
 /// <param name="normalFormat">Normal format.</param>
 public void PostProcess(Color[][] buffers, int width, int height, DiagramNormalFormat normalFormat)
 {
     for (int i = 0; i < outputs.Length; i++)
     {
         DiagramOutput o = outputs[i];
         if (o.type == DiagramTextureType.NormalMap)
         {
             o.GenerateNormalMap(width, height, buffers[i], normalFormat);
         }
     }
 }
Пример #2
0
        /// <summary>
        /// Posts process filled pixel buffer. Call after Fill or FillRows with the same pixel data.
        /// </summary>
        /// <param name="buffer">The buffer.</param>
        /// <param name='outputIndex'>Index of the output to use.</param>
        /// <param name="width">Width.</param>
        /// <param name="height">Height.</param>
        /// <param name="normalFormat">Normal format.</param>
        public void PostProcess(Color[] buffer, int outputIndex, int width, int height, DiagramNormalFormat normalFormat)
        {
            if (outputIndex >= outputs.Length)
            {
                return;
            }
            DiagramOutput o = outputs[outputIndex];

            if (o.type == DiagramTextureType.NormalMap)
            {
                o.GenerateNormalMap(width, height, buffer, normalFormat);
            }
        }