[Bf-blender-cvs] [5be0dfe086c] blender2.8: Eevee: Fix Dof shader compilation.

Clément Foucault noreply at git.blender.org
Sat May 12 23:25:04 CEST 2018


Commit: 5be0dfe086c7b3f2b705b90059a0d3c377effbf4
Author: Clément Foucault
Date:   Sat May 12 23:18:27 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB5be0dfe086c7b3f2b705b90059a0d3c377effbf4

Eevee: Fix Dof shader compilation.

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

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

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

diff --git a/source/blender/draw/engines/eevee/shaders/effect_dof_vert.glsl b/source/blender/draw/engines/eevee/shaders/effect_dof_vert.glsl
index 338003b92cd..6e43115d799 100644
--- a/source/blender/draw/engines/eevee/shaders/effect_dof_vert.glsl
+++ b/source/blender/draw/engines/eevee/shaders/effect_dof_vert.glsl
@@ -40,7 +40,12 @@ void main()
 	coc = min(coc, bokeh_maxsize);
 
 	if (coc >= 1.0) {
-		color = texelFetch((is_near) ? nearBuffer : farBuffer, texelco, 0);
+		if (is_near) {
+			color = texelFetch(nearBuffer, texelco, 0);
+		}
+		else {
+			color = texelFetch(farBuffer, texelco, 0);
+		}
 		/* find the area the pixel will cover and divide the color by it */
 		color.a = 1.0 / (coc * coc * M_PI);
 		color.rgb *= color.a;



More information about the Bf-blender-cvs mailing list