From ecc281c56a8c3c297cfd2f0b6d4671b2000efd9b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 4 Apr 2020 13:36:45 +0200 Subject: Shader Demo: Factor out version-dependent GLSL header --- shaders/header_330.glsl | 1 + shaders/rect.frag | 2 -- shaders/rect.vert | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) create mode 100644 shaders/header_330.glsl (limited to 'shaders') diff --git a/shaders/header_330.glsl b/shaders/header_330.glsl new file mode 100644 index 0000000..5ae7f43 --- /dev/null +++ b/shaders/header_330.glsl @@ -0,0 +1 @@ +#version 330 core diff --git a/shaders/rect.frag b/shaders/rect.frag index 5e3af9d..8622782 100644 --- a/shaders/rect.frag +++ b/shaders/rect.frag @@ -1,5 +1,3 @@ -#version 330 core - /* The fragment shader uses the UV coordinates to calculate whether it is in the T, R, B, or L border. These are then mixed with the border color, and their inverse is mixed with the fill color, to calculate the fragment color. diff --git a/shaders/rect.vert b/shaders/rect.vert index bf2e951..337f105 100644 --- a/shaders/rect.vert +++ b/shaders/rect.vert @@ -1,5 +1,3 @@ -#version 330 core - /* The vertex shader is trivial, but forwards scaled UV coordinates (in pixels) to the fragment shader for drawing the border. */ -- cgit v1.2.1