| Crates.io | dxfilter |
| lib.rs | dxfilter |
| version | 0.5.13 |
| created_at | 2022-07-30 22:56:04.029269+00 |
| updated_at | 2024-06-08 21:50:47.66014+00 |
| description | Process textures with DirectX shaders. Includes few Scale, Color conversion filters and utils to make your own. |
| homepage | https://github.com/rhinostream/dxfilter-rs |
| repository | https://github.com/rhinostream/dxfilter-rs.git |
| max_upload_size | |
| id | 635829 |
| size | 60,228 |
Scale and ColorConversion done with DirectX filters. You can also create your own filters with the provided api.
Crate contains various tools to make these features possible.
generate_shader! and compile_shader! macros to write shaders that compile at compile timeDxFilter interface for writing custom filterscreate_device_context , create_input_tex, create_output_tex for easier setup.AdapterFactory, Adapter, TextureReader imported
from win_desktop_duplication.For example usage, look at examples/rgb_to_nv12.rs
// for more detailed example see examples/rgb_to_nv12.rs
fn main() {
// {...}
// Texture Texture directx device
let filter = ConvertARGBToNV12::new(&input_tex, &output_tex, &device).unwrap();
// directx device
filter.apply_filter(&context).unwrap();
// { ... }
}