diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-06-15 12:31:43 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-06-15 12:31:45 +0300 |
commit | 1a7099f3ecf52fa8a54c2ba3f652d5827ca9103c (patch) | |
tree | f52e4768a0579a98654dcd57539a419b7f767716 /source/blender/draw/engines/eevee/shaders/effect_motion_blur_frag.glsl | |
parent | 826f3c715ce176894a558540ef97dc47125df12b (diff) |
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.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/effect_motion_blur_frag.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/effect_motion_blur_frag.glsl | 2 |
1 files changed, 2 insertions, 0 deletions
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; |