1.0.3 |
|
---|---|
1.0.1 |
|
#8 in #shadertoy
150KB
3K
SLoC
Otium
A Shader playground for creating digital paintings.
Motivation
Like many others, I enjoy creative coding with shaders. Websites like Shadertoy are excellent for prototyping and learning from others. However, Shadertoy's usability can vary greatly based on geographic location and the website sometimes glitches on certain browsers. Performance is generally poor and complex shaders often crash my browser. In addition, once I have created a work, I often want to save it to file and print it for display. As far as I can tell, the current tools created by the community lack the ability to export high-res images suitable for editing and printing workflows. Screenshotting can only go so far.
Additionally, like many others, I wanted to pick up a new skill during all the down time caused by the 2020 pandemic. I started experimenting with Rust and quickly fell in love with the language.
Usage
Otium is designed to be familiar to anyone who has used Shadertoy. Bring your fragment shader and it does the rest.
There are many configuration options available. Use otium --help
to see the list.
Creating Digital Paintings
When rendering a painting for writing to disk, Otium uses high quality 16-bit textures and writes the data to uncompressed 16-bit TIFF files.
Documentation
Detailed documentation is available on docs.rs.
Building Otium
Internally, Otium uses the shaderc crate, which in turn uses a C++ library. This requires CMake, Python and Ninja to be installed.
Once you have all the dependencies installed, simply build with Cargo. I recommend building in Release mode for performance.
Dependencies
~56–75MB
~1.5M SLoC