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:
Diffstat (limited to 'source/blender/python/gpu/gpu_py_shader.c')
-rw-r--r--source/blender/python/gpu/gpu_py_shader.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/python/gpu/gpu_py_shader.c b/source/blender/python/gpu/gpu_py_shader.c
index bd52fbb0de5..38a5629a2cc 100644
--- a/source/blender/python/gpu/gpu_py_shader.c
+++ b/source/blender/python/gpu/gpu_py_shader.c
@@ -120,8 +120,8 @@ static PyObject *bpygpu_shader_new(PyTypeObject *UNUSED(type), PyObject *args, P
return NULL;
}
- GPUShader *shader = GPU_shader_create(
- params.vertexcode, params.fragcode, params.geocode, params.libcode, params.defines, NULL);
+ GPUShader *shader = GPU_shader_create_from_python(
+ params.vertexcode, params.fragcode, params.geocode, params.libcode, params.defines);
if (shader == NULL) {
PyErr_SetString(PyExc_Exception, "Shader Compile Error, see console for more details");
@@ -609,6 +609,10 @@ PyDoc_STRVAR(
" To debug shaders, use the --debug-gpu-shaders command line option"
" to see full GLSL shader compilation and linking errors.\n"
"\n"
+ " For drawing user interface elements and gizmos, use "
+ " ``fragOutput = blender_srgb_to_framebuffer_space(fragOutput)``"
+ " to transform the output sRGB colors to the framebuffer colorspace."
+ "\n"
" :param vertexcode: Vertex shader code.\n"
" :type vertexcode: str\n"
" :param fragcode: Fragment shader code.\n"