Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <mail@jlucke.com>2018-11-05 21:26:53 +0300
committerJacques Lucke <mail@jlucke.com>2018-11-05 21:28:28 +0300
commita8e9959e07a05f08cbe28a3b37c0b24874f6f76f (patch)
tree56f012d4ec7ab60c0940d8eaa1c3af71464f54c1 /doc/python_api/examples/gpu.shader.py
parentabbe4df30164b6a73c3d05efca1ecbacaf5a0476 (diff)
API Docs: gpu api introduction + examples
Diffstat (limited to 'doc/python_api/examples/gpu.shader.py')
-rw-r--r--doc/python_api/examples/gpu.shader.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/python_api/examples/gpu.shader.py b/doc/python_api/examples/gpu.shader.py
new file mode 100644
index 00000000000..7ffd3fe85c8
--- /dev/null
+++ b/doc/python_api/examples/gpu.shader.py
@@ -0,0 +1,35 @@
+"""
+Built-in shaders
+++++++++++++++++
+
+All built-in shaders have the ``mat4 ModelViewProjectionMatrix`` uniform.
+The value of it can only be modified using the :class:`gpu.matrix` module.
+"""
+
+2D_UNIFORM_COLOR:
+ attributes: vec3 pos
+ uniforms: vec4 color
+
+2D_FLAT_COLOR:
+ attributes: vec3 pos, vec4 color
+ uniforms: -
+
+2D_SMOOTH_COLOR:
+ attributes: vec3 pos, vec4 color
+ uniforms: -
+
+2D_IMAGE:
+ attributes: vec3 pos, vec2 texCoord
+ uniforms: sampler2D image
+
+3D_UNIFORM_COLOR:
+ attributes: vec3 pos
+ uniforms: vec4 color
+
+3D_FLAT_COLOR:
+ attributes: vec3 pos, vec4 color
+ uniforms: -
+
+3D_SMOOTH_COLOR:
+ attributes: vec3 pos, vec4 color
+ uniforms: -