[Bf-blender-cvs] [f59f655] strand_gpu: Fix for calculation of the view vector in strand shading.
Lukas Tönne
noreply at git.blender.org
Sun Jul 17 12:40:52 CEST 2016
Commit: f59f6553ccc69b6eb14d8641e5ea1ed343faaa08
Author: Lukas Tönne
Date: Sun Jul 17 12:37:39 2016 +0200
Branches: strand_gpu
https://developer.blender.org/rBf59f6553ccc69b6eb14d8641e5ea1ed343faaa08
Fix for calculation of the view vector in strand shading.
The product with the model-view matrix must take translation into account.
===================================================================
M source/blender/gpu/shaders/gpu_shader_strand_vert.glsl
===================================================================
diff --git a/source/blender/gpu/shaders/gpu_shader_strand_vert.glsl b/source/blender/gpu/shaders/gpu_shader_strand_vert.glsl
index 28fa0e2..f54707e 100644
--- a/source/blender/gpu/shaders/gpu_shader_strand_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_strand_vert.glsl
@@ -51,7 +51,7 @@ void main()
#endif
gl_Position = gl_ProjectionMatrix * co;
- fPosition = mat3_emu(gl_ModelViewMatrix) * loc;
+ fPosition = co.xyz;
fTangent = gl_NormalMatrix * nor;
fColor = (nor + vec3(1.0)) * 0.5;
}
More information about the Bf-blender-cvs
mailing list