summaryrefslogtreecommitdiff
path: root/shaders
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-04-09 12:19:02 -0700
committerEric Anholt <eric@anholt.net>2013-04-09 12:21:12 -0700
commit4679fe1c5f92e80fcd1bff29be25f15844147f1e (patch)
tree29465426f7c302fb5ad10e1c8643c5fcf68dc8ff /shaders
parent9b0edf439a9d5f5298112191c75d392a6b904121 (diff)
Add shaders from sauerbraten.
The app mostly uses ARB programs, so there's not much here.
Diffstat (limited to 'shaders')
-rw-r--r--shaders/sauerbraten/11.shader_test16
-rw-r--r--shaders/sauerbraten/2.shader_test10
-rw-r--r--shaders/sauerbraten/5.shader_test16
-rw-r--r--shaders/sauerbraten/8.shader_test23
4 files changed, 65 insertions, 0 deletions
diff --git a/shaders/sauerbraten/11.shader_test b/shaders/sauerbraten/11.shader_test
new file mode 100644
index 0000000..4359954
--- /dev/null
+++ b/shaders/sauerbraten/11.shader_test
@@ -0,0 +1,16 @@
+[require]
+GLSL >= 1.10
+
+[fragment shader]
+void main() {}
+
+init: world
+init: sound
+init: cfg
+init: mainloop
+read map packages/base/mpsp9a.ogz (0.4 seconds)
+Private Stan Sauer: Run & Gun Part I by MitaMAN
+game mode is SP
+[vertex shader]
+void main() { gl_Position = ftransform(); }
+
diff --git a/shaders/sauerbraten/2.shader_test b/shaders/sauerbraten/2.shader_test
new file mode 100644
index 0000000..4b0a354
--- /dev/null
+++ b/shaders/sauerbraten/2.shader_test
@@ -0,0 +1,10 @@
+[require]
+GLSL >= 1.10
+
+[fragment shader]
+void main(void) {
+ gl_FragColor = vec4(0.0);
+}
+
+Rendering using the OpenGL assembly/GLSL shader path.
+
diff --git a/shaders/sauerbraten/5.shader_test b/shaders/sauerbraten/5.shader_test
new file mode 100644
index 0000000..ce27109
--- /dev/null
+++ b/shaders/sauerbraten/5.shader_test
@@ -0,0 +1,16 @@
+[require]
+GLSL >= 1.10
+
+[fragment shader]
+void main(void)
+ {
+ gl_FragColor = gl_Color;
+ }
+
+[vertex shader]
+void main(void)
+ {
+ gl_Position = ftransform();
+ gl_FrontColor = gl_Color;
+ }
+
diff --git a/shaders/sauerbraten/8.shader_test b/shaders/sauerbraten/8.shader_test
new file mode 100644
index 0000000..85fda5d
--- /dev/null
+++ b/shaders/sauerbraten/8.shader_test
@@ -0,0 +1,23 @@
+[require]
+GLSL >= 1.10
+
+[fragment shader]
+void main(void)
+ {
+ gl_FragColor = gl_Color;
+
+#define FOG_COLOR gl_Fog.color
+gl_FragColor.rgb = mix((FOG_COLOR).rgb, gl_FragColor.rgb, clamp((gl_Fog.end - gl_FogFragCoord) * gl_Fog.scale, 0.0, 1.0));
+}
+
+[vertex shader]
+#pragma CUBE2_fog
+ void main(void)
+ {
+ gl_Position = ftransform();
+ gl_FrontColor = gl_Color;
+
+#define FOG_COORD gl_Vertex
+gl_FogFragCoord = -dot((FOG_COORD), gl_ModelViewMatrixTranspose[2]);
+}
+