Skip to content

Instantly share code, notes, and snippets.

@daddyYukio
Created September 16, 2022 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daddyYukio/db60f5463bbd17418e80001bc9257ed6 to your computer and use it in GitHub Desktop.
Save daddyYukio/db60f5463bbd17418e80001bc9257ed6 to your computer and use it in GitHub Desktop.
スマホでVR写真表示アプリを作る(Xamarin) - シェーダー
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