Feedback Requested: Introducing GSoC '24 Plans for Review by Fellow Contributors

I’m thrilled to announce that this summer, I’ll be working on the “Improved rendering, including Tessellation Shaders / Depth of Field and dynamic level-of-detail” project as part of Google Summer of Code. I’d like to extend my gratitude to my mentor, @ghutchis , for selecting me as a contributor this summer. Additionally, I want to express my appreciation to the other contributors who have addressed numerous crucial issues in the AvogadroLibs repository. I’m eager to receive their feedback and guidance as I work on completing my tasks. I’m also interested in hearing their thoughts on this project.

My name is Perminder Singh, and I’m from India. I have a passion for working with shaders, and in the past, I’ve contributed numerous features to organizations like p5.js. I’ve created various sketches focusing on shaders. I’m a highly motivated individual and thrive on accomplishing tasks quickly and efficiently.

My project has a broad scope; it aims to not only add new features but also enhance rendering efficiency with version updates.

I have divided the tasks in total 5 parts:-

  1. I’ll be working on is adding a depth-of-field blur rendering option. This feature request aims to include a blur option where, when activated, the atoms of the molecule that are far from the camera will appear blurred. This enhancement will improve the user experience. (Already written shader, a very few work left).

  2. The second feature request is to add a fog option. With this request, the distant parts of the molecule from the camera won’t be clearly visible, similar to how things appear in foggy conditions.
    (already done research)

  3. The third part of the project involves addressing this issue: Migrate to OpenGL Core Profile · Issue #864 · OpenChemistry/avogadrolibs · GitHub. This issue focuses on migrating OpenGL to its core profile. I’m considering using OpenGL version 4.0 specifically because tessellation shaders are compatible with version 4.0 or higher.( Could be challenging since it would be done using gl3w library, doing research)

  4. The fourth part involves adding progressive refinement. When we render complex molecules and select “Solvent Excluded” under Analysis ⇒ Create Surfaces, there’s a performance decrease. To tackle this issue, I’ll be incorporating tessellation shaders. These shaders will enable us to gradually refine the generation of molecules without experiencing any performance drops.

  5. The fifth and final part is to integrate tessellation shaders into secondary structures or ribbons. Currently, when we render molecules and choose the Vanderwall’s option, the rendering speed is slightly faster than when rendering molecules as ribbons. This is because spheres are created in the GPU as imposters, while ribbons are created in the CPU. The goal is to use tessellation shaders to render ribbon-structured molecules in the GPU, thus speeding up the process significantly.

Of course, that doesn’t rule out doing more work afterwards :wink:

Any comments or feedbacks are highly appriciated. Thankyou:)


My suggestion is that we switch to glbinding: GitHub - cginternals/glbinding: A C++ binding for the OpenGL API, generated using the gl.xml specification.

I mentioned a few times on the forum - I don’t know how difficult this will be, but probably not too bad.

The other hidden task is to do some profiling / benchmarking. The last time I profiled the rendering code, I found a number of issues (e.g., the shaders were being compiled many, many times instead of once).

Marcus also did much of the rendering and may have some ideas.

1 Like