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:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-08-30 21:12:57 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-08-30 23:12:31 +0300
commitb7cb7b78a87dbf19d6aefe2736df7f873476bf72 (patch)
treeed2ed442889edfd7afddea693f333122b90d0a0e /source/blender/python/gpu/gpu_py_shader.c
parentaf3f744b4162ec98489e047f3982e5aa3f56a8c8 (diff)
Docs: GPU Shader: improvements
Changes: - line break - enum highlighting - better description
Diffstat (limited to 'source/blender/python/gpu/gpu_py_shader.c')
-rw-r--r--source/blender/python/gpu/gpu_py_shader.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/source/blender/python/gpu/gpu_py_shader.c b/source/blender/python/gpu/gpu_py_shader.c
index c7b59ee0d6e..95e505b1343 100644
--- a/source/blender/python/gpu/gpu_py_shader.c
+++ b/source/blender/python/gpu/gpu_py_shader.c
@@ -665,7 +665,7 @@ PyDoc_STRVAR(
".. class:: GPUShader(vertexcode, fragcode, geocode=None, libcode=None, defines=None)\n"
"\n"
" GPUShader combines multiple GLSL shaders into a program used for drawing.\n"
- " It must contain a vertex and fragment shaders, with an optional geometry shader.\n"
+ " It must contain at least a vertex and fragment shaders.\n"
"\n"
" The GLSL ``#version`` directive is automatically included at the top of shaders,\n"
" and set to 330. Some preprocessor directives are automatically added according to\n"
@@ -722,9 +722,10 @@ PyDoc_STRVAR(pygpu_shader_from_builtin_doc,
" Shaders that are embedded in the blender internal code.\n"
" They all read the uniform ``mat4 ModelViewProjectionMatrix``,\n"
" which can be edited by the :mod:`gpu.matrix` module.\n"
+ "\n"
" You can also choose a shader configuration that uses clip_planes by setting the "
"``CLIPPED`` value to the config parameter. Note that in this case you also need to "
- "manually set the value of ``ModelMatrix``.\n"
+ "manually set the value of ``mat4 ModelMatrix``.\n"
"\n"
" For more details, you can check the shader code with the\n"
" :func:`gpu.shader.code_from_builtin` function.\n"
@@ -733,6 +734,7 @@ PyDoc_STRVAR(pygpu_shader_from_builtin_doc,
"\n" PYDOC_BUILTIN_SHADER_LIST
" :type shader_name: str\n"
" :param config: One of these types of shader configuration:\n"
+ "\n"
" - ``DEFAULT``\n"
" - ``CLIPPED``\n"
" :type config: str\n"
@@ -766,7 +768,7 @@ static PyObject *pygpu_shader_from_builtin(PyObject *UNUSED(self), PyObject *arg
PyDoc_STRVAR(pygpu_shader_code_from_builtin_doc,
".. function:: code_from_builtin(pygpu_shader_name)\n"
"\n"
- " Exposes the internal shader code for query.\n"
+ " Exposes the internal shader code for consultation.\n"
"\n"
" :param pygpu_shader_name: One of these builtin shader names:\n"
"\n" PYDOC_BUILTIN_SHADER_LIST
@@ -828,27 +830,28 @@ PyDoc_STRVAR(pygpu_shader_module__tp_doc,
".. rubric:: Built-in shaders\n"
"\n"
"All built-in shaders have the ``mat4 ModelViewProjectionMatrix`` uniform.\n"
- "The value of it can only be modified using the :class:`gpu.matrix` module.\n"
"\n"
- "2D_UNIFORM_COLOR\n"
+ "Its value must be modified using the :class:`gpu.matrix` module.\n"
+ "\n"
+ "``2D_UNIFORM_COLOR``\n"
" :Attributes: vec3 pos\n"
" :Uniforms: vec4 color\n"
- "2D_FLAT_COLOR\n"
+ "``2D_FLAT_COLOR``\n"
" :Attributes: vec3 pos, vec4 color\n"
" :Uniforms: none\n"
- "2D_SMOOTH_COLOR\n"
+ "``2D_SMOOTH_COLOR``\n"
" :Attributes: vec3 pos, vec4 color\n"
" :Uniforms: none\n"
- "2D_IMAGE\n"
+ "``2D_IMAGE``\n"
" :Attributes: vec3 pos, vec2 texCoord\n"
" :Uniforms: sampler2D image\n"
- "3D_UNIFORM_COLOR\n"
+ "``3D_UNIFORM_COLOR``\n"
" :Attributes: vec3 pos\n"
" :Uniforms: vec4 color\n"
- "3D_FLAT_COLOR\n"
+ "``3D_FLAT_COLOR``\n"
" :Attributes: vec3 pos, vec4 color\n"
" :Uniforms: none\n"
- "3D_SMOOTH_COLOR\n"
+ "``3D_SMOOTH_COLOR``\n"
" :Attributes: vec3 pos, vec4 color\n"
" :Uniforms: none\n");
static PyModuleDef pygpu_shader_module_def = {