#![allow(unused)]
use rs2glsl::prelude::*;
#[glsl_native]
mod stdlib {
pub fn abs(x: f32) -> f32 {
x.abs()
}
pub fn exp(e: f32) -> f32 {
e.exp()
}
}
#[glsl]
mod glsl {
use super::stdlib::*;
fn mul(x: f32, y: f32) -> f32 {
return x * y;
}
fn multiply_accumulate(a: f32, b: f32, c: f32) -> f32 {
return a + mul(b, c);
}
const PI: f32 = 3.1415;
fn unused() {}
pub fn foo() -> f32 {
return multiply_accumulate(PI, 0.5, 10.0) + exp(2.0);
}
}
use glsl::*;
fn main() {
println!("{}", GLSL_FOO.with_dependencies());
}