Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.08 KB | None | 0 0
  1. // Add boundaries to value texture
  2.     for (int i = 0; i < finishedSize; i++)
  3.     {
  4.         bool isCurrentTrace = headers[i].active;
  5.        
  6.         if (!isCurrentTrace)
  7.         {
  8.             if (i == 0) // First trace
  9.             {
  10.                 if (headers[i + 1].active)
  11.                 {
  12.                     for (int j = 0; j < sampleCount; j++)
  13.                     {
  14.                         valueTexture((sampleCount - 1) - j, i) = valueTexture((sampleCount - 1) - j, i + 1);
  15.                     }
  16.                 }
  17.             }
  18.             else if (i == finishedSize - 1) // Last trace
  19.             {
  20.                 if (headers[i - 1].active)
  21.                 {
  22.                     for (int j = 0; j < sampleCount; j++)
  23.                     {
  24.                         valueTexture((sampleCount - 1) - j, i) = valueTexture((sampleCount - 1) - j, i - 1);
  25.                     }
  26.                 }
  27.             }
  28.             else // Any others traces
  29.             {
  30.                 if (headers[i - 1].active)
  31.                 {
  32.                     for (int j = 0; j < sampleCount; j++)
  33.                     {
  34.                         valueTexture((sampleCount - 1) - j, i) = valueTexture((sampleCount - 1) - j, i - 1);
  35.                     }
  36.                 }
  37.                 else if (headers[i + 1].active)
  38.                 {
  39.                     for (int j = 0; j < sampleCount; j++)
  40.                     {
  41.                         valueTexture((sampleCount - 1) - j, i) = valueTexture((sampleCount - 1) - j, i + 1);
  42.                     }
  43.                 }
  44.             }
  45.         }      
  46.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement