Last active
November 28, 2019 14:34
-
-
Save hiroyuki/9f2356a148b22a48285a9171575e93c9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// fragment shader | |
#version 150 | |
// this is how we receive the texture | |
uniform sampler2D tex0; | |
in vec2 varyingtexcoord; | |
out vec4 outputColor; | |
void main() | |
{ | |
vec4 color = texture(tex0, varyingtexcoord); | |
outputColor = color; | |
} |
This file contains hidden or 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
#version 150 | |
uniform mat4 modelViewProjectionMatrix; | |
out vec2 varyingtexcoord; | |
in vec4 position; | |
void main(){ | |
varyingtexcoord = position.xy/720.0;//screen width | |
gl_Position = modelViewProjectionMatrix * position; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment