Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

This CLI app allows you to generate an output shader file from #include

usage

for windows

go to system variables > environment variables > PATH > add the bin folder to the path

then open the cmd in the folder of your shader, and use so like shaderinclude sourceFile.frag outFile.frag

as an example:

main.frag:

#ifdef GL_ES
precision mediump float;
#endif

#include "colorShift.frag"

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
  vec2 uv = fragCoord.xy / iResolution.xy;
  uv.x *= iResolution.x / iResolution.y;
  vec4 col = vec4(vec3(uv, 0.), 1.);

  col = shift(col);

  fragColor = col;
}

colorShift.frag:

vec4 shift(in vec4 color) {
    return color.bgra;
}

result:

#ifdef GL_ES
precision mediump float;
#endif

vec4 shift(in vec4 color) {
    return color.bgra;
}


void mainImage(out vec4 fragColor, in vec2 fragCoord) {
    vec2 uv = fragCoord.xy / iResolution.xy;
    uv.x *= iResolution.x / iResolution.y;
    vec4 col = vec4(vec3(uv, 0.), 1.);

    col = shift(col);

    fragColor = col;
}

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages