Skip to content

Instantly share code, notes, and snippets.

@arusu0629
Last active April 8, 2018 10:56
Show Gist options
  • Save arusu0629/2dcc7819966a011e0f4602d0858b065f to your computer and use it in GitHub Desktop.
Save arusu0629/2dcc7819966a011e0f4602d0858b065f to your computer and use it in GitHub Desktop.
<html>
<head>
<title>WebGL TEST</title>
<script src="script.js" type="text/javascript"></script>
<script src="/Users/toru_nakandakari/wgld/minMatrix.js" type="text/javascript"></script>
<script id="vs" type="x-shader/x-vertex">
attribute vec3 position;
attribute vec4 color;
uniform mat4 mvpMatrix;
varying vec4 vColor;
void main(void){
vColor = color;
gl_Position = mvpMatrix * vec4(position, 1.0);
}
</script>
<script id="fs" type="x-shader/x-fragment">
precision mediump float;
varying vec4 vColor;
void main(void){
gl_FragColor = vColor;
}
</script>
</head>
<body>
<canvas id="canvas"></canvas>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment