SHARE
TWEET

Untitled

a guest Oct 3rd, 2016 48 Never
  1. //Toon shader
  2. //Vertex shader -----------------------------
  3. //
  4. //  ToonShader.vsh
  5. //  created with Shaderific
  6. //
  7. //  Vertex shader for cartoon-style shading
  8. //
  9. //  Author: Philip Rideout
  10. //
  11. //  Copyright (c) 2005-2006 3Dlabs Inc. Ltd.
  12. //
  13. //  See the editor settings menu for license information
  14. //
  15. attribute vec4 position;
  16. attribute vec3 normal;
  17. uniform mat4 modelViewProjectionMatrix;
  18. uniform highp mat4 modelViewMatrix;
  19. uniform mat3 normalMatrix;
  20. varying vec3 eyespaceNormal;
  21. varying vec4 eyespacePosition;
  22. void main(void)
  23. {
  24.     eyespaceNormal = normalMatrix * normal;
  25.     eyespacePosition = modelViewMatrix * position;
  26.     gl_Position = modelViewProjectionMatrix * position;
  27. }
RAW Paste Data
Top