Browse code

Add uniform block / buffer

Robert Cranston authored on 17/05/2020 15:29:35
Showing 1 changed files
... ...
@@ -2,6 +2,7 @@
2 2
 
3 3
 
4 4
 #extension GL_ARB_shading_language_include : require
5
+#extension GL_ARB_uniform_buffer_object : require
5 6
 
6 7
 
7 8
 #include "all_green.h"
... ...
@@ -9,6 +10,10 @@
9 10
 
10 11
 uniform float blue;
11 12
 uniform vec4 color;
13
+layout(std140) uniform small
14
+{
15
+    vec4 value1;
16
+};
12 17
 
13 18
 
14 19
 void main()
Browse code

Add uniform GLM

Robert Cranston authored on 16/05/2020 10:39:49
Showing 1 changed files
... ...
@@ -8,9 +8,10 @@
8 8
 
9 9
 
10 10
 uniform float blue;
11
+uniform vec4 color;
11 12
 
12 13
 
13 14
 void main()
14 15
 {
15
-    gl_FragColor = vec4(red, green, blue, 1.0);
16
+    gl_FragColor = vec4(red, green, blue, color.a);
16 17
 }
Browse code

Add uniform scalars

Robert Cranston authored on 21/05/2021 00:46:44
Showing 1 changed files
... ...
@@ -7,7 +7,10 @@
7 7
 #include "all_green.h"
8 8
 
9 9
 
10
+uniform float blue;
11
+
12
+
10 13
 void main()
11 14
 {
12
-    gl_FragColor = vec4(red, green, 0.25, 1.0);
15
+    gl_FragColor = vec4(red, green, blue, 1.0);
13 16
 }
Browse code

Add preprocessing include

Robert Cranston authored on 26/02/2021 16:36:35
Showing 1 changed files
... ...
@@ -1,7 +1,13 @@
1 1
 #version 110
2 2
 
3 3
 
4
+#extension GL_ARB_shading_language_include : require
5
+
6
+
7
+#include "all_green.h"
8
+
9
+
4 10
 void main()
5 11
 {
6
-    gl_FragColor = vec4(red, 0.5, 0.25, 1.0);
12
+    gl_FragColor = vec4(red, green, 0.25, 1.0);
7 13
 }
Browse code

Add preprocessing defines

Robert Cranston authored on 26/02/2021 23:38:21
Showing 1 changed files
... ...
@@ -3,5 +3,5 @@
3 3
 
4 4
 void main()
5 5
 {
6
-    gl_FragColor = vec4(1.0, 0.5, 0.25, 1.0);
6
+    gl_FragColor = vec4(red, 0.5, 0.25, 1.0);
7 7
 }
Browse code

Add create

Robert Cranston authored on 16/05/2020 11:49:30
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,7 @@
1
+#version 110
2
+
3
+
4
+void main()
5
+{
6
+    gl_FragColor = vec4(1.0, 0.5, 0.25, 1.0);
7
+}