webgl-rc-macro

Crates.iowebgl-rc-macro
lib.rswebgl-rc-macro
version0.1.4
sourcesrc
created_at2022-06-28 23:37:39.413344
updated_at2024-10-12 18:50:50.60535
descriptionGLSL loading macro for webgl-rc
homepage
repositoryhttps://github.com/monkin/webgl-rc
max_upload_size
id615082
size11,882
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: 24

cargo fmt