forked from pythonarcade/arcade
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
33 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#version 330 | ||
|
||
in vec4 v_color; | ||
out vec4 f_color; | ||
|
||
void main() { | ||
f_color = v_color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#version 330 | ||
|
||
uniform mat4 Projection; | ||
uniform vec2 Position; | ||
uniform float Angle; | ||
|
||
in vec2 in_vert; | ||
in vec4 in_color; | ||
|
||
out vec4 v_color; | ||
|
||
void main() { | ||
float angle = radians(Angle); | ||
mat2 rotate = mat2( | ||
cos(angle), sin(angle), | ||
-sin(angle), cos(angle) | ||
); | ||
gl_Position = Projection * vec4(Position + (rotate * in_vert), 0.0, 1.0); | ||
v_color = in_color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters