Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Add boundaries to value texture
- for (int i = 0; i < finishedSize; i++)
- {
- bool isCurrentTrace = headers[i].active;
- if (!isCurrentTrace)
- {
- if (i == 0) // First trace
- {
- if (headers[i + 1].active)
- {
- for (int j = 0; j < sampleCount; j++)
- {
- valueTexture((sampleCount - 1) - j, i) = valueTexture((sampleCount - 1) - j, i + 1);
- }
- }
- }
- else if (i == finishedSize - 1) // Last trace
- {
- if (headers[i - 1].active)
- {
- for (int j = 0; j < sampleCount; j++)
- {
- valueTexture((sampleCount - 1) - j, i) = valueTexture((sampleCount - 1) - j, i - 1);
- }
- }
- }
- else // Any others traces
- {
- if (headers[i - 1].active)
- {
- for (int j = 0; j < sampleCount; j++)
- {
- valueTexture((sampleCount - 1) - j, i) = valueTexture((sampleCount - 1) - j, i - 1);
- }
- }
- else if (headers[i + 1].active)
- {
- for (int j = 0; j < sampleCount; j++)
- {
- valueTexture((sampleCount - 1) - j, i) = valueTexture((sampleCount - 1) - j, i + 1);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement