#gfx #graphics #antialiasing #SMAA

gfx_smaa

A library for post process antialiasing using SMAA

2 unstable releases

0.2.0 Aug 6, 2018
0.1.0 Jan 28, 2018

#40 in Rendering

Download history 2/week @ 2018-05-23 7/week @ 2018-05-30 2/week @ 2018-06-13 1/week @ 2018-06-20 16/week @ 2018-06-27 5/week @ 2018-07-04 3/week @ 2018-07-11 3/week @ 2018-07-18 2/week @ 2018-07-25 3/week @ 2018-08-01 27/week @ 2018-08-08

23 downloads per month

MIT license

1MB
15K SLoC

gfx_smaa crates.io docs.rs Travis

A library for post process antialiasing for the gfx-rs graphics API, based on the SMAA reference implementation. Currently only works with OpenGL 3+, but support for other graphics APIs is planned.

Example

// create window
let mut window: PistonWindow = WindowSettings::new("SMAA", (640, 480)).build().unwrap();

// create target
let mut target = SmaaTarget::<_>::new(&mut window.factory,
                                      window.output_color.clone(),
                                      640, 480).unwrap();

// main loop
while let Some(e) = window.next() {
    window.draw_3d(&e, |window| {
        // clear depth and color buffers.
        window.encoder.clear_depth(&target.output_depth(), 1.0);
        window.encoder.clear(&target.output_color(), [0.0, 0.0, 0.0, 1.0]);

        // Render the scene.
        ...

        // Perform actual antialiasing operation and write the result to the screen.
        target.resolve(&mut window.encoder);
     });
}

Dependencies

~1.5MB
~35K SLoC