Created
September 16, 2022 07:07
-
-
Save daddyYukio/db60f5463bbd17418e80001bc9257ed6 to your computer and use it in GitHub Desktop.
スマホでVR写真表示アプリを作る(Xamarin) - シェーダー
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.VertexShader = | |
"#version 300 es \n" + | |
"in vec4 position; \n" + | |
"in vec2 texcoord; \n" + | |
"out vec2 textureCoordinate; \n" + | |
"uniform mat4 projection; \n" + | |
"void main() \n" + | |
"{ \n" + | |
" gl_Position = projection * position; \n" + | |
" textureCoordinate = texcoord; \n" + | |
"} \n"; | |
this.FragmentShader = | |
"#version 300 es \n" + | |
"in highp vec2 textureCoordinate; \n" + | |
"out lowp vec4 fragColor; \n" + | |
"uniform lowp sampler2D text; \n" + | |
"void main() \n" + | |
"{ \n" + | |
" fragColor = texture(text, textureCoordinate);\n" + | |
"} \n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment