diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/models/cube.obj | 39 | ||||
-rw-r--r-- | data/shaders/grid.frag | 19 | ||||
-rw-r--r-- | data/shaders/grid.vert | 18 | ||||
-rw-r--r-- | data/shaders/mesh.frag | 20 | ||||
-rw-r--r-- | data/shaders/mesh.vert | 17 | ||||
-rw-r--r-- | data/shaders/ui.frag | 10 | ||||
-rw-r--r-- | data/shaders/ui.vert | 10 | ||||
-rw-r--r-- | data/sounds/hurt.ogg | bin | 0 -> 5982 bytes | |||
-rw-r--r-- | data/sounds/meltdown.ogg | bin | 0 -> 5001115 bytes | |||
-rw-r--r-- | data/textures/grid.png | bin | 0 -> 10801 bytes |
10 files changed, 133 insertions, 0 deletions
diff --git a/data/models/cube.obj b/data/models/cube.obj new file mode 100644 index 0000000..fbb6361 --- /dev/null +++ b/data/models/cube.obj @@ -0,0 +1,39 @@ +# Blender 4.4.1 +# www.blender.org +o Cube +v 0.500000 0.500000 -0.500000 +v 0.500000 -0.500000 -0.500000 +v 0.500000 0.500000 0.500000 +v 0.500000 -0.500000 0.500000 +v -0.500000 0.500000 -0.500000 +v -0.500000 -0.500000 -0.500000 +v -0.500000 0.500000 0.500000 +v -0.500000 -0.500000 0.500000 +vn -0.0000 1.0000 -0.0000 +vn -0.0000 -0.0000 1.0000 +vn -1.0000 -0.0000 -0.0000 +vn -0.0000 -1.0000 -0.0000 +vn 1.0000 -0.0000 -0.0000 +vn -0.0000 -0.0000 -1.0000 +vt 0.999900 0.999900 +vt 0.000100 0.999900 +vt 0.000100 0.000100 +vt 0.999900 0.000100 +vt 0.000100 0.000100 +vt 0.999900 0.000100 +vt 0.999900 0.999900 +vt 0.000100 0.999900 +vt 0.999900 0.999900 +vt 0.000100 0.999900 +vt 0.000100 0.000100 +vt 0.999900 0.000100 +vt 0.999900 0.000100 +vt 0.000100 0.999900 +vt 0.000100 0.000100 +s 0 +f 1/1/1 5/2/1 7/3/1 3/4/1 +f 4/5/2 3/6/2 7/7/2 8/8/2 +f 8/9/3 7/10/3 5/11/3 6/12/3 +f 6/13/4 2/7/4 4/14/4 8/15/4 +f 2/5/5 1/6/5 3/7/5 4/8/5 +f 6/9/6 5/10/6 1/11/6 2/12/6 diff --git a/data/shaders/grid.frag b/data/shaders/grid.frag new file mode 100644 index 0000000..2bfdd7a --- /dev/null +++ b/data/shaders/grid.frag @@ -0,0 +1,19 @@ +#version 330 core + +in VSOUT { + vec2 texcoords; +} vsout; + +out vec4 frag_color; + +uniform sampler2D texture0; + +void main(void) +{ + const float gamma = 2.2; + + vec3 color = vec3(texture(texture0, vsout.texcoords)); + color = pow(color, vec3(1.0/gamma)); + + frag_color = vec4(color, 0.5); +} diff --git a/data/shaders/grid.vert b/data/shaders/grid.vert new file mode 100644 index 0000000..4cb8948 --- /dev/null +++ b/data/shaders/grid.vert @@ -0,0 +1,18 @@ +#version 330 core + +layout(location = 0) in vec3 aposition; +layout(location = 2) in vec2 atexcoords; + +out VSOUT { + vec2 texcoords; +} vsout; + +uniform mat4 projection; +uniform mat4 view; +uniform mat4 world; + +void main(void) +{ + vsout.texcoords = atexcoords; + gl_Position = projection*view*world*vec4(aposition, 1.0); +} diff --git a/data/shaders/mesh.frag b/data/shaders/mesh.frag new file mode 100644 index 0000000..6e9365e --- /dev/null +++ b/data/shaders/mesh.frag @@ -0,0 +1,20 @@ +#version 330 core + +in VSOUT { + vec2 texcoords; +} vsout; + +out vec4 frag_color; + +uniform sampler2D texture0; +uniform vec3 color; + +void main(void) +{ + const float gamma = 2.2; + + vec3 result = vec3(texture(texture0, vsout.texcoords)); + result = pow(result, vec3(1.0/gamma)); + + frag_color = vec4(result*color, 1.0); +} diff --git a/data/shaders/mesh.vert b/data/shaders/mesh.vert new file mode 100644 index 0000000..c53f508 --- /dev/null +++ b/data/shaders/mesh.vert @@ -0,0 +1,17 @@ +#version 330 core +layout(location = 0) in vec3 aposition; +layout(location = 2) in vec2 atexcoords; + +out VSOUT { + vec2 texcoords; +} vsout; + +uniform mat4 projection; +uniform mat4 view; +uniform mat4 world; + +void main(void) +{ + vsout.texcoords = atexcoords; + gl_Position = projection*view*world*vec4(aposition, 1.0); +} diff --git a/data/shaders/ui.frag b/data/shaders/ui.frag new file mode 100644 index 0000000..03b3b62 --- /dev/null +++ b/data/shaders/ui.frag @@ -0,0 +1,10 @@ +#version 330 core + +out vec4 frag_color; + +uniform vec4 color; + +void main(void) +{ + frag_color = color; +} diff --git a/data/shaders/ui.vert b/data/shaders/ui.vert new file mode 100644 index 0000000..6f252e5 --- /dev/null +++ b/data/shaders/ui.vert @@ -0,0 +1,10 @@ +#version 330 core +layout(location = 0) in vec3 aposition; + +uniform mat4 projection; +uniform mat4 world; + +void main(void) +{ + gl_Position = projection*world*vec4(aposition, 1.0); +} diff --git a/data/sounds/hurt.ogg b/data/sounds/hurt.ogg Binary files differnew file mode 100644 index 0000000..b24074d --- /dev/null +++ b/data/sounds/hurt.ogg diff --git a/data/sounds/meltdown.ogg b/data/sounds/meltdown.ogg Binary files differnew file mode 100644 index 0000000..e9f27cb --- /dev/null +++ b/data/sounds/meltdown.ogg diff --git a/data/textures/grid.png b/data/textures/grid.png Binary files differnew file mode 100644 index 0000000..eb951c3 --- /dev/null +++ b/data/textures/grid.png |