projectM-visualizer / projectM-visualizer/projectm
[FEATURE] Improve line rendering on higher resolutions
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 4.5k
- Forks
- 485
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 5
Description
Currently, projectM implements the exact same line rendering technique as Milkdrop. It renders either a single, 1px-wide line or four 1px-wide lines in a 2x2 raster for thick/bold lines. There are a few issues with the current implementation, from which Milkdrop also suffers:
- Line anti-aliasing is not a guaranteed feature, e.g. it's basically only available on desktop platforms and if the line is only 1px wide.
- The line with always stays the same, regardless of the rendering resolution, meaning that the higher the resolution gets, there is less and less brightness/color added to the image overall. This causes many presets to become darker or almost black on 4K+ screens, while very small resoutions will be way too bright.
- Vulkan/Metal don't support line rendering with the optional
VK_EXT_line_rasterizationextension.
Ideally, line width should scale smoothly with the rendering resolution, e.g. 1px width (or 2px for thick lines) at 1000px. such lines would then render 4px/8px wide on 4K resolutions, covering about the same percentage of image pixels overall.
One feasible approach would be implementing a technique suggested by this article, which will also work fine for OpenGL and WebGL. This will also take care of line joints and end caps to look nice, e.g. shapes can use miter joints while waveforms should ideally be rendered with round joints and end caps.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating the existing line-rendering implementation and compare its OpenGL, WebGL, Vulkan, and Metal paths with the linked instanced-lines article. Done should include resolution-scaled lines with appropriate joints and end caps across the supported rendering backends.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100