diff options
-rw-r--r-- | shaders/bullet_fragment.glsl | 4 | ||||
-rw-r--r-- | shaders/bullet_vertex.glsl | 12 |
2 files changed, 6 insertions, 10 deletions
diff --git a/shaders/bullet_fragment.glsl b/shaders/bullet_fragment.glsl index 71486ec..55e29ff 100644 --- a/shaders/bullet_fragment.glsl +++ b/shaders/bullet_fragment.glsl @@ -1,6 +1,4 @@ -#version 120 - -in mat3x4 v_tex_rot; +varying mat3 v_tex_rot; uniform sampler2D tex; void main() { diff --git a/shaders/bullet_vertex.glsl b/shaders/bullet_vertex.glsl index 96281cd..0717b0a 100644 --- a/shaders/bullet_vertex.glsl +++ b/shaders/bullet_vertex.glsl @@ -1,14 +1,12 @@ -#version 120 - -varying out mat3x4 v_tex_rot; +varying mat3 v_tex_rot; void main() { vec4 l_position = gl_Vertex; vec2 l_direction = normalize(l_position.zw); - v_tex_rot = mat3x4( - l_direction.x, l_direction.y, 0.0, 0.0, - -l_direction.y, l_direction.x, 0.0, 0.0, - 1.0 - l_direction.x + l_direction.y, 1.0 - l_direction.y - l_direction.x, 0.0, 0.0); + v_tex_rot = mat3( + l_direction.x, l_direction.y, 0.0, + -l_direction.y, l_direction.x, 0.0, + 1.0 - l_direction.x + l_direction.y, 1.0 - l_direction.y - l_direction.x, 0.0); l_position.zw = vec2(0.0, 1.0); gl_FrontColor = gl_Color; gl_Position = gl_ModelViewProjectionMatrix * l_position; |