BasicShader.js 374 B

123456789101112131415161718192021222324252627282930
  1. ( function () {
  2. /**
  3. * Simple test shader
  4. */
  5. const BasicShader = {
  6. uniforms: {},
  7. vertexShader:
  8. /* glsl */
  9. `
  10. void main() {
  11. gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
  12. }`,
  13. fragmentShader:
  14. /* glsl */
  15. `
  16. void main() {
  17. gl_FragColor = vec4( 1.0, 0.0, 0.0, 0.5 );
  18. }`
  19. };
  20. THREE.BasicShader = BasicShader;
  21. } )();