[Bf-blender-cvs] [1a7099f3ecf] blender2.8: Fix T51463: Eevee motion blur not working (with AMD)

Dalai Felinto noreply at git.blender.org
Thu Jun 15 11:32:36 CEST 2017


Commit: 1a7099f3ecf52fa8a54c2ba3f652d5827ca9103c
Author: Dalai Felinto
Date:   Thu Jun 15 11:31:43 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB1a7099f3ecf52fa8a54c2ba3f652d5827ca9103c

Fix T51463: Eevee motion blur not working (with AMD)

GLSL needs FragColor to be initialized. The default vec4 value seems to be
implementation dependent. Or it's a bug on Mesa/AMD.

===================================================================

M	source/blender/draw/engines/eevee/shaders/effect_motion_blur_frag.glsl

===================================================================

diff --git a/source/blender/draw/engines/eevee/shaders/effect_motion_blur_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_motion_blur_frag.glsl
index 8960b339a61..045fcd11fae 100644
--- a/source/blender/draw/engines/eevee/shaders/effect_motion_blur_frag.glsl
+++ b/source/blender/draw/engines/eevee/shaders/effect_motion_blur_frag.glsl
@@ -56,6 +56,8 @@ void main()
 
 	float inc = 2.0 * inv_samples;
 	float i = -1.0 + noise;
+
+	FragColor = vec4(0.0, 0.0, 0.0, 1.0);
 	for (int j = 0; j < samples && j < MAX_SAMPLE; j++) {
 		FragColor += texture(colorBuffer, uvcoordsvar.xy + motion * i) * inv_samples;
 		i += inc;




More information about the Bf-blender-cvs mailing list