[Qgis-psc] QEP 424: Move away from geometry shaders in QGIS 3D grant report
Dominik Cindrić
viperminiq at gmail.com
Mon Nov 16 00:10:25 PST 2026
Hi all,
this is a report for the 2026 grant program for QEP 424: Move away from
geometry shaders in QGIS 3D (
https://github.com/qgis/QGIS-Enhancement-Proposals/pull/381)
Aim of the QEP was to remove all geometry shaders from QGIS, so that QGIS
doesn't rely on a stage many modern graphics APIs do not support.
This was accomplished by a combination of instanced rendering and moving
the existing work geometry shaders did to CPU (to prepare a geometry/quad)
and vertex shaders.
The following work was done:
- removal of the billboards geometry shader (
https://github.com/qgis/QGIS/pull/66837)
Billboards are now instanced, attributes are specified for each instance.
Behavior is the same as with the geometry shader.
- removal of the mesh geometry shader (
https://github.com/qgis/QGIS/pull/66938)
Displaying mesh layers in 3D is possible with wireframe on or off. When it
is on, vertices are not deduplicated, so that we can do the maths
necessarry for each vertex (barycentric coordinates). This wastes a bit
more GPU memory, but the behavior stays the same as with the geometry
shader and this is what most other solutions also implement. When wireframe
is off, vertices are indexed (deduplicated). Shading normals are calculated
in the fragment shader now.
- removal of the lines geometry shader (
https://github.com/qgis/QGIS/pull/67356)
Lines are now instanced. This is done in two passes: one for drawing of the
segments, the other for drawing of joins. Near-plane clipping is handled in
the vertex shader. There is no overlap between the segments and the joins.
Currently, we do not have an option to specify transparency to the lines,
but if we did, it would work out of the box with the current implementation.
- code cleanups (https://github.com/qgis/QGIS/pull/68075)
Dead code was removed after all the geometry shaders were removed.
The task was fully accomplished, no geometry shaders are present in the
QGIS codebase.
Thank you!
- Dominik Cindrić
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-psc/attachments/20261116/9307d25d/attachment.htm>
More information about the QGIS-PSC
mailing list