Overview In the previous post I prepared the code for join styles implementation. But after geometry shader performance testing I decided to make a version with geometry shader. Implementation Join styles There are three join styles: bevel miter round Bevel join style The bevel join style fills the triangular notch between the two... Read more 24 Jun 2025 - 8 minute read
Overview I decided to check if geometry shader provides better performance for polyline rendering comparing to normal one. For test application I gonna render 3 segments as quads. The code is about to be pretty simple. Without geometry shader Traditional way (only vertex and fragment shaders) has been implemented previously. Let’s recall it. ... Read more 23 Jun 2025 - 6 minute read
Overview In the previous post I optimized polyline rendering with different caps. But we need to prepare our code for join implementation. Implementation Instead of usage of semi previous and semi next points for direction calculation we could use real previous and next points, and calculate current segment direction vector via linear interpo... Read more 19 Jun 2025 - 3 minute read
Overview In the previous post I created a screen space invariant width polyline rendering with different caps. But there’s an optimization available. Optimization No need to store offset mask in vertex, we could store point type itself $T$ and compute the offset mask value $M$. Let’s define point type $T$ as: \[T = \begin{cases} -1\quad\text... Read more 18 Jun 2025 - 3 minute read
Overview In the previous post I created a screen space invariant width polyline rendering with rounded joins. Now I gonna cover different caps on sides. Implementation Caps can have different styles. Cap styles The cap style defines how the end points of lines are drawn. We will base cap styles on Qt version. So there will be following styl... Read more 16 Jun 2025 - 5 minute read