SHARE
TWEET

p2.html

a guest Oct 20th, 2019 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head><title>Halloween Game</title></head>
  3.  
  4. <script id="vertex-shader" type="x-shader/x-vertex">
  5. attribute  vec4 vPosition;
  6. attribute  vec4 vColor;
  7. varying vec4 fColor;
  8.  
  9. uniform mat4 modelViewMatrix;
  10. uniform mat4 projectionMatrix;
  11.  
  12. void main() {
  13.    gl_Position =  projectionMatrix * modelViewMatrix * vPosition;
  14.    fColor = vColor;
  15. }
  16. </script>
  17.  
  18. <script id="fragment-shader" type="x-shader/x-fragment">
  19. precision mediump float;
  20. varying vec4 fColor;
  21.    
  22. void main() {
  23.    gl_FragColor = fColor;
  24. }
  25. </script>
  26.  
  27. <script type="text/javascript" src="../Common/webgl-utils.js"></script>
  28. <script type="text/javascript" src="../Common/initShaders.js"></script>
  29. <script type="text/javascript" src="../Common/MV.js"></script>
  30. <script type="text/javascript" src="p2.js"></script>
  31.  
  32.  
  33. <body onload="main()">
  34. <canvas id="gl-canvas" width="830"" height="512">
  35. Oops ... your browser doesn't support the HTML5 canvas element
  36. </canvas>
  37.  
  38. </body>
  39. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top