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-02-01 18:46:32 +0300
committerAlexander Romanov <a.romanov@blend4web.com>2016-02-01 18:46:32 +0300
commit25de685d3668b6ed10af144ff33e2d44da00df61 (patch)
treea9e1a5669c08427e860df0cfd494c9189647cee7 /source/blender/gpu
parent80a540903359210fe882c42d59b976f3f91ffe06 (diff)
Fix T47288 Vector transform not behaving correctly with camera space and cycles
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index c8ce9f7a229..4429770f998 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -384,6 +384,12 @@ void vec_math_negate(vec3 v, out vec3 outv)
outv = -v;
}
+void invert_z(vec3 v, out vec3 outv)
+{
+ v.z = -v.z;
+ outv = v;
+}
+
void normal(vec3 dir, vec3 nor, out vec3 outnor, out float outdot)
{
outnor = nor;