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:
authorAlexander Romanov <a.romanov@blend4web.com>2016-06-07 10:33:32 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-06-07 11:21:55 +0300
commit1e5735ab993e0c585f9009246c2c4443fa3430af (patch)
tree62d946ef35a3a1b1347a0695bdcd7595e1d1b0a8 /source/blender/gpu/GPU_material.h
parent5750549f6a6e8c28161e9bb49687c7342b492982 (diff)
World space switch for BI nodes.
At the moment light shading in Blender is produced in viewspace. Apparently, that's why shader nodes work with normals in camera space. But it is not convenient for artists. The more convenient approach is implemented in Cycles where normals are represented in world space. Blend4Web Team designed the engine keeping in mind shader parameters readability, so normals are interpreted in world space as well. And now our users have to use some tweaks, like empty node group with the name "Replace", which is replacing one input by another on the engine side (replacing working configuration in Blender Viewport by the configuration that has the same behavior in the engine). This patch adds the ability to switch to world space for normals and lamp vector in BI and Viewport. This patch is very important to us and we crave to see this patch in Blender 2.7 because it will significantly simplify Blend4Web material creation workflow. {F315547} {F315548} Reviewers: campbellbarton, brecht Reviewed By: brecht Subscribers: homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov Differential Revision: https://developer.blender.org/D2046
Diffstat (limited to 'source/blender/gpu/GPU_material.h')
-rw-r--r--source/blender/gpu/GPU_material.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h
index f77b62260be..3413ee0d161 100644
--- a/source/blender/gpu/GPU_material.h
+++ b/source/blender/gpu/GPU_material.h
@@ -236,6 +236,7 @@ void GPU_material_vertex_attributes(GPUMaterial *material,
bool GPU_material_do_color_management(GPUMaterial *mat);
bool GPU_material_use_new_shading_nodes(GPUMaterial *mat);
+bool GPU_material_use_world_space_shading(GPUMaterial *mat);
/* Exported shading */