Rx v0.3 Released, a modern and minimalist pixel editor in Rust
rx.cloudhead.io
rx.cloudhead.io
Rust doesn't really have anything super mature in terms of UI, though druid[0] is the one I'm keeping an eye on. Since there's very little "UI" per se in rx, it's currently built directly on top of the graphics layer[1].
* Its backend (gfx-rs) is one of the most mature rust libraries for doing graphics
* The popular "classic" 2d libraries like cairo and skia are very big and complicated to build / depend on
* wgpu will eventually also work on the web, so it's a great option for broad platform compatibility
* In terms of efficiency (memory, battery, cpu etc.), the modern graphic APIs have more headroom than the GL-based ones
* Today, 4K screens are pretty common, and in the future, 144hz monitors will be more and more popular. If I want to render 2d graphics with no latency in those setups, access to the GPU makes things feasible
are those not feasible today ? due to vsync & al I still have less latency on apps that do software rendering than hardware, even on a 4K 120hz screen
I'd expect these kinds of operations to be slow at high resolution without the help of the GPU. You could probably speed things up with SIMD and multi-threading, at the expense of implementation complexity.
VSync, if done properly, only adds less than a single frame of latency.
That is 17ms tops for 60Hz, which nobody notices unless you are a pro-gamer on an FPS game. Certainly it does not matter for a pixel editor.
In terms of comparison with an FPS, the same amount of responsiveness is required for any UI - ie. there should be no perceptual latency.
Adding 17ms certainly is perceptual.
I ended up targeting 1920x1080@60 and having a shader nearest neighbor scale that up.
It may be harder than editing a Cargo file, but it is something you do once. They are some of the most mature and tested libraries in the world.
> wgpu will eventually also work on the web, so it's a great option for broad platform compatibility
OpenGL works everywhere today, including the web!
> In terms of efficiency (memory, battery, cpu etc.), the modern graphic APIs have more headroom than the GL-based ones
It doesn't matter for a pixel editor. Even if it did, you would have to do a very good job to beat the driver's GL implementation.
Otherwise, you may end up with something slower or buggier!
> Today, 4K screens are pretty common, and in the future, 144hz monitors will be more and more popular. If I want to render 2d graphics with no latency in those setups, access to the GPU makes things feasible
Perhaps, but again, GL allows you to do that.
Is it using MoltenVK?
This would be opposed to a legacy codebase that might rely on an old version of OpenGL (which is deprecated completely on MacOS), the OS to scale the window (usually blurring the pixel art), require 32 bit architecture support, and not have any guarantees about memory safety.
As time goes on what features are considered modern will of course continue to change. Most code was modern at one point.
"I hate this too" goes a lot farther than "I like this too."
Maybe I'm on the wrong site if that's what I'm looking for, but I suggest anyone reading this try to boost some of the more positive comments they see.
everyone on hn is of the belief about themselves that they're dispassionate (objective) intellectuals and so of course their criticisms aren't in bad faith.
and moderators never address these kinds of comments but do often address comments like yours because they incite "flame wars" (since dispassionate intellectuals can be quite defensive).
So ridiculous that I didn't even feel it deserved a response.
I'm not super into pixel art, but will definitely be trying this out nonetheless.
Besides, given the extreme signal:noise ratio of codebases that gain notoriety most projects that share a name or acronym will only have a handful of users even aware of both's existence.
It's difficult because it's easy to miss obscure social niches and name variants, and that's why most people make the task easier with an effort to find unique names.
For example, a sloppy google search for "Rx" yields, in search result order:
- two medical abbreviation, for "recipe" (i.e. "take") in medical prescriptions and for radiography: benign but common and used in proper names of pharmacies, labs etc.;
- Radeon RX-something video cards, unlikely to be confused but likely to yield search result noise for something related to videogames;
- some Lexus cars, popular but more harmless;
- iZotope RX 7, a major software entry: professional "audio repair" DAW plugins from a popular company;
- several unimportant random product and company names, including e.g. some Sony headphones, that collectively prove how "Rx" is an inappropriately short name.
A longer and more unique name would clearly be a better choice. But a further web search for "rx pixel" yields an awful lot of medical video card and car results and a frontal collision on Twitter, where dr. Jennifer Hazel goes by "@Rx_Pixel".
Searching for "rx editor" is also interesting:
- a deluge of iZotope RX results (no hope to become more popular, low-resolution image editors are a smaller niche than audio production)
- the highly popular RxJS JavaScript library. It doesn't take a JavaScript expert to figure out that it's highly popular: the home page mentions a conference about it.
This last conflict should be enough to veto the name "Rx", even without more targeted searches (e.g. social media) and less online-visible usages (e.g. in telecommunications as an abbreviation of receiver or reception, paired with "Tx" for transmitter or transmission).
Many Rust projects are blah-rs where the rs is dropped in the crate name. So it would be normal to be confused and think Rx == RxRust. e.g. https://github.com/rust-lang/futures-rs has crate name "futures".
>There's not that many good, short names.
There'd be loads if the Rust community (or.. the 'rust parliamentary community' (people who actually get involved in the RFC processes and see things through to the end (heroes, imo)) (cf PLP[0])) elected to use namespaces for crates.
[0] https://en.wikipedia.org/wiki/Parliamentary_Labour_Party
I would also recommend choosing a less overloaded name. Searching for "rx" in Google brings up prescription-related results.
Then the movie dispicable me came out, then the Minions movie, and now we are off on page 11.