Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3D Spectrogram #1291

Merged
merged 12 commits into from
Jun 20, 2022
Merged

3D Spectrogram #1291

merged 12 commits into from
Jun 20, 2022

Conversation

srcejon
Copy link
Collaborator

@srcejon srcejon commented Jun 20, 2022

SDRangel already uses OpenGL, so couldn't resist :)

Demo here: https://www.youtube.com/watch?v=fCKjjDsE4S8

A couple of notes:

  • To improve 3D quality, I have added an option for multisampling anti-aliasing (MSAA) to the spectrum window. This also results in the histogram being anti-aliased:

image

It can be enabled/disabled by the new Preferences > Graphics menu. Default is off - so it should look no different unless you switch it on. Note that the option only takes effect when the window is created, so you may need to restart SDRangel to see a difference.

There were a few problems getting this working on the Mac. Until now, all SDRangel GLSL shader code appeared to be using 2.x syntax. Unfortunately, on the Mac, when requesting an OpenGL 3.3+ context (which is needed for the Shaded rendering in the 3D Spectrogram and also the Map feature), because the Mac only supports the OpenGL 3 Core profile, none of the 2.x shaders work (Any deprecated features are not implemented in the Core profile). Also, in the 3 Core profile, VAOs are required, but weren't currently used. So I have updated all of the shaders to have two versions: one using OpenGL 2 syntax for OpenGL < 3.3 and the other with version 330 shaders for OpenGL 3.3+. Tested on:

Windows - opengl 4.6
Windows - opengl 3.0 (ANGLE)
Ubuntu 20.04 - opengl 3.3
Ubuntu 22.04 - opengl 4.1
Mac - opengl 4.1

I don't have a Pi to test on - but hopefully should work. If not, let me know!

@f4exb f4exb merged commit 09c49d0 into f4exb:master Jun 20, 2022
@f4exb
Copy link
Owner

f4exb commented Jun 20, 2022

I checked the video and it looks nice indeed. Not sure the choice of colormap also applies in 2D. I think that would be useful too but we can check later.

@srcejon
Copy link
Collaborator Author

srcejon commented Jun 20, 2022

Yes, I didn't try to change any of the 2D stuff, so it just applies to 3D currently (the combo box is hidden in 2D mode). But should be trivial to add.

@srcejon
Copy link
Collaborator Author

srcejon commented Jun 21, 2022

Not sure the choice of colormap also applies in 2D. I think that would be useful too but we can check later.

Just been playing around with another shader - I can add optional filling for the spectrum as well, either as a solid or gradient based on the same colour maps:

image

image

image

@f4exb
Copy link
Owner

f4exb commented Jun 21, 2022

Interesting... particularly the gradient ones as they can give a visual differentiation of the magnitudes.

@f4exb
Copy link
Owner

f4exb commented Jun 21, 2022

On a different note we may need to split the first block of controls in the GUI (there are currently 4 blocks in a flow layout that make a best fit of the GLSpectrum GUI controls space depending on the overall spectrum window shape without breaking at illogical places). I can take care of this later.

@srcejon srcejon deleted the spectrogram3d branch July 18, 2022 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants