Macro shades::inputs[][src]

macro_rules! inputs {
    ($s:ident, $( $name:ident : $t:ty ),+) => { ... };
}

Input declaration.

Examples

use shades::{Scope, ShaderBuilder, Swizzlable, V3, V4, inputs, sw};

ShaderBuilder::new_vertex_shader(|mut s, vertex| {
  inputs!(s,
    position: V3<f32>,
    color: V4<f32>
  );

  s.main_fun(|s: &mut Scope<()>| {
    let rgb = sw!(color, .r.g.b);
  })
});