Skip to content

Commit

Permalink
Treesitter syntax highlighting for inline glsl strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom94 committed Jan 4, 2024
1 parent 1e00621 commit 1c25e99
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/UberShader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ UberShader::UberShader(RenderPass* renderPass) {
precision highp float;)";
# endif
auto vertexShader = preamble +
R"(
R"glsl(
uniform vec2 pixelSize;
uniform vec2 checkerSize;
Expand All @@ -43,10 +43,10 @@ UberShader::UberShader(RenderPass* renderPass) {
referenceUv = position * referenceScale + referenceOffset;
gl_Position = vec4(position, 1.0, 1.0);
})";
})glsl";

auto fragmentShader = preamble +
R"(
R"glsl(
#define SRGB 0
#define GAMMA 1
#define FALSE_COLOR 2
Expand Down Expand Up @@ -192,7 +192,7 @@ UberShader::UberShader(RenderPass* renderPass) {
);
gl_FragColor.rgb = clamp(gl_FragColor.rgb, clipToLdr ? 0.0 : -64.0, clipToLdr ? 1.0 : 64.0);
})";
})glsl";
#elif defined(NANOGUI_USE_METAL)
auto vertexShader =
R"(using namespace metal;
Expand Down

0 comments on commit 1c25e99

Please sign in to comment.