Last active
April 8, 2018 10:56
-
-
Save arusu0629/2dcc7819966a011e0f4602d0858b065f to your computer and use it in GitHub Desktop.
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
<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