[Bf-blender-cvs] [268670cdee] blender2.8: Clay Engine: Fix Axis Name shader
Clément Foucault
noreply at git.blender.org
Thu Feb 16 16:24:39 CET 2017
Commit: 268670cdee483ac47fb5abdd670924973e00aa6c
Author: Clément Foucault
Date: Thu Feb 16 14:24:50 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB268670cdee483ac47fb5abdd670924973e00aa6c
Clay Engine: Fix Axis Name shader
===================================================================
M source/blender/gpu/shaders/gpu_shader_instance_screenspace_axis_name_vert.glsl
===================================================================
diff --git a/source/blender/gpu/shaders/gpu_shader_instance_screenspace_axis_name_vert.glsl b/source/blender/gpu/shaders/gpu_shader_instance_screenspace_axis_name_vert.glsl
index a7accd9c3e..a39bfde41e 100644
--- a/source/blender/gpu/shaders/gpu_shader_instance_screenspace_axis_name_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_instance_screenspace_axis_name_vert.glsl
@@ -24,6 +24,6 @@ void main()
offset = vec3(0.0, 0.0, 1.125);
vec3 screen_pos = screen_vecs[0].xyz * pos.x + screen_vecs[1].xyz * pos.y;
- gl_Position = ViewProjectionMatrix * InstanceModelMatrix * vec4((screen_pos + offset) * size, 1.0);
+ gl_Position = ViewProjectionMatrix * (InstanceModelMatrix * vec4(offset * size, 1.0) + vec4(screen_pos * size, 0.0));
finalColor = vec4(color, 1.0);
}
More information about the Bf-blender-cvs
mailing list