#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

#37 in Rendering

Download history 1/week @ 2018-08-30 4/week @ 2018-09-06 3/week @ 2018-09-13 1/week @ 2018-09-20 6/week @ 2018-09-27 3/week @ 2018-10-04 12/week @ 2018-10-11 10/week @ 2018-10-18 10/week @ 2018-10-25 6/week @ 2018-11-01 25/week @ 2018-11-08 38/week @ 2018-11-15 4/week @ 2018-11-22

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
~27K SLoC