Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e83413e2d12b
Choose a base ref
...
head repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 36cf91a1fa9b
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Aug 21, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d227e8e View commit details
  2. Copy the full SHA
    36cf91a View commit details
Showing with 8 additions and 6 deletions.
  1. +1 −1 lib
  2. +6 −1 src/glscopeclient/WaveformArea_rendering.cpp
  3. +1 −4 src/glscopeclient/shaders/waveform-compute.glsl
2 changes: 1 addition & 1 deletion lib
Submodule lib updated from 402579 to a69887
7 changes: 6 additions & 1 deletion src/glscopeclient/WaveformArea_rendering.cpp
Original file line number Diff line number Diff line change
@@ -192,11 +192,16 @@ void WaveformArea::PrepareGeometry(WaveformRenderData* wdata)
dt = GetTime() - start;
m_indexTime += dt;

//Scale alpha by zoom.
//As we zoom out more, reduce alpha to get proper intensity grading
float samplesPerPixel = 1.0f / (m_group->m_pixelsPerXUnit * pdat->m_timescale);
float alpha_scaled = m_parent->GetTraceAlpha() * 2 / samplesPerPixel;

//Config stuff
wdata->m_mappedConfigBuffer[0] = m_height; //windowHeight
wdata->m_mappedConfigBuffer[1] = m_plotRight; //windowWidth
wdata->m_mappedConfigBuffer[2] = wdata->m_count; //depth
wdata->m_mappedConfigBuffer[3] = m_parent->GetTraceAlpha() * 256; //alpha
wdata->m_mappedFloatConfigBuffer[3] = alpha_scaled; //alpha
wdata->m_mappedConfigBuffer[4] = digdat ? 1 : 0; //digital
wdata->m_mappedFloatConfigBuffer[5] = xoff; //xoff
wdata->m_mappedFloatConfigBuffer[6] = xscale; //xscale
5 changes: 1 addition & 4 deletions src/glscopeclient/shaders/waveform-compute.glsl
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ layout(std430, binding=2) buffer config
uint windowHeight;
uint windowWidth;
uint memDepth;
uint alpha_scaled;
float alpha;
uint digital;
float xoff;
float xscale;
@@ -70,9 +70,6 @@ void main()
if(gl_GlobalInvocationID.x > windowWidth)
return;

//Save some constants
float alpha = float(alpha_scaled) / 256;

//Clear column to blank in the first thread of the block
if(gl_LocalInvocationID.y == 0)
{