webgl-rc-macro

Crates.iowebgl-rc-macro
lib.rswebgl-rc-macro
version0.1.3
sourcesrc
created_at2022-06-28 23:37:39.413344
updated_at2022-10-01 20:51:38.452971
descriptionGLSL loading macro for webgl-rc
homepage
repositoryhttps://github.com/monkin/webgl-rc
max_upload_size
id615082
size11,750
Andrey Monkin (monkin)

documentation

README

GLSL Loader for webgl-rc

Shader file

/* include absolute path 'project_dir/glsl/lib/color.glsl'  */
#include <lib/color.glsl>

/* include relative path './common/bezier.glsl' */
#include "./common/bezier.glsl"

void main() {
    ...
}

Rust file

use webgl_rc::load_glsl;

const fragment_source: &str = load_glsl!("fragment.glsl");

Commit count: 23

cargo fmt