diff options
author | Eric Anholt <eric@anholt.net> | 2013-04-09 12:19:02 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2013-04-09 12:21:12 -0700 |
commit | 4679fe1c5f92e80fcd1bff29be25f15844147f1e (patch) | |
tree | 29465426f7c302fb5ad10e1c8643c5fcf68dc8ff | |
parent | 9b0edf439a9d5f5298112191c75d392a6b904121 (diff) |
Add shaders from sauerbraten.
The app mostly uses ARB programs, so there's not much here.
-rw-r--r-- | COPYING | 20 | ||||
-rw-r--r-- | shaders/sauerbraten/11.shader_test | 16 | ||||
-rw-r--r-- | shaders/sauerbraten/2.shader_test | 10 | ||||
-rw-r--r-- | shaders/sauerbraten/5.shader_test | 16 | ||||
-rw-r--r-- | shaders/sauerbraten/8.shader_test | 23 |
5 files changed, 85 insertions, 0 deletions
@@ -131,3 +131,23 @@ From the website: and on the DVDs, and all of the contents on this website has been licensed under the Creative Commons Attribution license 3.0." " + +shaders/sauerbraten/*: +Copyright © 2001-2010 Wouter van Oortmerssen. + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + 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]); +} + |