gpu.shader.py 678 B

12345678910111213141516171819202122232425262728293031323334353637
  1. """
  2. Built-in shaders
  3. ++++++++++++++++
  4. All built-in shaders have the ``mat4 ModelViewProjectionMatrix`` uniform.
  5. The value of it can only be modified using the :class:`gpu.matrix` module.
  6. 2D_UNIFORM_COLOR:
  7. attributes: vec3 pos
  8. uniforms: vec4 color
  9. 2D_FLAT_COLOR:
  10. attributes: vec3 pos, vec4 color
  11. uniforms: -
  12. 2D_SMOOTH_COLOR:
  13. attributes: vec3 pos, vec4 color
  14. uniforms: -
  15. 2D_IMAGE:
  16. attributes: vec3 pos, vec2 texCoord
  17. uniforms: sampler2D image
  18. 3D_UNIFORM_COLOR:
  19. attributes: vec3 pos
  20. uniforms: vec4 color
  21. 3D_FLAT_COLOR:
  22. attributes: vec3 pos, vec4 color
  23. uniforms: -
  24. 3D_SMOOTH_COLOR:
  25. attributes: vec3 pos, vec4 color
  26. uniforms: -
  27. """