Go to file
2022-11-24 02:08:00 -05:00
.idea dx11: hello_triangle 2022-11-22 01:56:39 -05:00
librashader dx11: begin to work on dx11 implementation 2022-11-24 01:37:16 -05:00
librashader-common dx11: begin to work on dx11 implementation 2022-11-24 01:37:16 -05:00
librashader-preprocess fmt: cleanup unused items 2022-11-21 17:47:38 -05:00
librashader-presets fmt: clean up unused items 2022-11-21 16:21:50 -05:00
librashader-reflect dx11: begin to work on dx11 implementation 2022-11-24 01:37:16 -05:00
librashader-runtime-dx11 dx11: begin to work on dx11 implementation 2022-11-24 01:37:16 -05:00
librashader-runtime-gl gl: fix hello triangle 2022-11-24 02:08:00 -05:00
target fmt: run clippy 2022-11-11 01:53:02 -05:00
test gl: initialize history and feedback fbos before drawing 2022-11-21 02:36:37 -05:00
.gitignore dx11: hello_triangle 2022-11-22 01:56:39 -05:00
.gitmodules reflect: some cursed experiments 2022-10-25 01:47:41 -04:00
Cargo.lock dx11: begin to work on dx11 implementation 2022-11-24 01:37:16 -05:00
Cargo.toml lib: sort out base library structure 2022-11-21 16:53:36 -05:00
LICENSE-GPL.md doc: license under MPLv2 2022-11-21 20:49:18 -05:00
LICENSE.md doc: license under MPLv2 2022-11-21 20:49:18 -05:00
README.md dx11: begin to work on dx11 implementation 2022-11-24 01:37:16 -05:00

librashader

image

crt-royale-fake-bloom

A preprocessor, compiler, and runtime for RetroArch 'slang' shaders, rewritten in pure Rust.

Heavily WIP.

Supported Render APIs

librashader supports OpenGL 3, Vulkan, DirectX 11, and DirectX 12. Support is WIP for all runtimes except OpenGL 3. Older versions of DirectX and OpenGL, as well as Metal, are not supported (but pull-requests are welcome).

API Status librashader feature
OpenGL 3 gl
Vulkan 🚧 vk
DirectX 11 🚧 dx11
DirectX 12 🚧 dx12
OpenGL 2
DirectX 9
Metal

Usage

🚧 librashader_ld is WIP 🚧

librashader provides both a Rust API under the librashader crate, and a C API. Both APIs are first-class, fully supported.

The librashader C API is best used by linking statically with librashader_ld, which implements a loader that dynamically loads the librashader (librashader.so or rashader.dll) implementation in the search path.

License

The core parts of librashader such as the preprocessor, the preset parser, the reflection library, and the runtimes, are all licensed under the Mozilla Public License version 2.0.

The librashader C API, i.e. its headers and definitions, not its implementation in librashader_capi, are more permissively licensed, and may allow you to use librashader in your permissively licensed or proprietary project.

To facilitate easier use of librashader in projects incompatible with MPL-2.0, librashader_ld implements a loader which thunks its calls to any librashader.so or rashader.dll library found in the load path. A non-MPL-2.0 compatible project may link against librashader_ld to use the librashader runtime, provided that librashader.so or rashader.dll are distributed under the restrictions of MPLv2.

Note that this means that if your project is not compatible with MPL-2.0, you can not distribute librashader.so or rashader.dll alongside your project. The end user must obtain the implementation of librashader themselves.

At your discretion, you may instead choose to distribute librashader under the terms of GPLv3 rather than MPL-2.0