Skip to content

Commit 007afd0

Browse files
author
Tiffany Bennett
committed
Move demo-related shaders from IL
1 parent 5ddcdba commit 007afd0

File tree

6 files changed

+59
-1
lines changed

6 files changed

+59
-1
lines changed

shaders/box.frag

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#version 140
2+
3+
in vec3 position;
4+
out vec3 out_Color;
5+
6+
void main()
7+
{
8+
out_Color = position + vec3(1) / vec3(2);
9+
}

shaders/box.vert

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#version 140
2+
3+
in vec3 in_Position;
4+
out vec3 position;
5+
uniform mat4 mvp;
6+
7+
void main()
8+
{
9+
gl_Position = mvp * vec4(in_Position, 1.0);
10+
position = in_Position;
11+
}

shaders/bullet-debug.frag

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#version 140
2+
3+
in vec3 color;
4+
5+
out vec3 out_Color;
6+
7+
void main()
8+
{
9+
out_Color = color;
10+
}
11+

shaders/bullet-debug.vert

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#version 140
2+
3+
in vec3 in_Position;
4+
in vec3 in_Ambient;
5+
6+
uniform mat4 vp;
7+
8+
out vec3 color;
9+
10+
void main()
11+
{
12+
gl_Position = vp * vec4(in_Position, 1.0);
13+
color = in_Ambient;
14+
}
15+

shaders/rainbow2d.frag

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#version 140
2+
3+
in vec2 position;
4+
out vec3 out_Color;
5+
6+
void main()
7+
{
8+
vec3 col = vec3(0);
9+
col += mix(vec3(1, 0, 0), vec3(0, 1, 0), position.x);
10+
col += mix(vec3(0, 1, 0), vec3(1, 0, 1), position.y);
11+
out_Color = col;
12+
}

0 commit comments

Comments
 (0)