-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
20 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
#version 300 es | ||
// fragment shaders don't have a default precision so we need | ||
// to pick one. mediump is a good default | ||
precision mediump float; | ||
|
||
// color varying received from vertex shader | ||
varying vec4 v_color; | ||
in vec4 v_color; | ||
|
||
// equvalent of gl_FragColor in GLSL 100 | ||
out vec4 out_color; | ||
|
||
void main() { | ||
gl_FragColor = v_color; | ||
out_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 |
---|---|---|
@@ -1,7 +1,11 @@ | ||
#version 300 es | ||
|
||
precision mediump float; | ||
|
||
varying vec4 v_color; | ||
in vec4 v_color; | ||
|
||
out vec4 out_color; | ||
|
||
void main() { | ||
gl_FragColor = v_color; | ||
out_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
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