Skip to content

Commit

Permalink
Cleanup|Shaders: Use the #include directive
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed May 2, 2017
1 parent 6bb6e36 commit df88dd7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
@@ -1,5 +1,4 @@
# Shader for the DGL drawing routines that emulate OpenGL 1.x behavior.
shader dgl.draw {
path.vertex = "dgl_draw.vsh"
path.fragment = "dgl_draw.fsh"
path = "dgl_draw"
}
Expand Up @@ -112,8 +112,9 @@ generic {
vUV = aUV;
vColor = aColor * uColor;
}"
include.fragment <include/hsv.glsl>
fragment = "
#include 'include/hsv.glsl'

uniform sampler2D uTex;
uniform float uSaturation;
in vec2 vUV;
Expand Down
Expand Up @@ -26,8 +26,9 @@ ui {
vScissor = uScissorRect[index];
vSaturation = uSaturation[index];
}"
include.fragment <include/hsv.glsl>
fragment = "
#include 'include/hsv.glsl'

uniform sampler2D uTex;

in vec2 vUV;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/sdk/libgui/src/graphics/glshaderbank.cpp
Expand Up @@ -36,7 +36,7 @@ namespace de {

static String processIncludes(String source, String const &sourceFolderPath)
{
QRegularExpression const re("#include\\s+\"([^\"]+)\"");
QRegularExpression const re("#include\\s+['\"]([^\"']+)['\"]");
forever
{
auto found = re.match(source);
Expand Down

0 comments on commit df88dd7

Please sign in to comment.