[Bf-blender-cvs] [65328fa] master: Final solution for Intel card Ambient Occlusion in T43987.

Antony Riakiotakis noreply at git.blender.org
Mon May 18 22:11:11 CEST 2015


Commit: 65328fadc3c63c73d5c2e2e977de3dad5bd74219
Author: Antony Riakiotakis
Date:   Mon May 18 22:05:38 2015 +0200
Branches: master
https://developer.blender.org/rB65328fadc3c63c73d5c2e2e977de3dad5bd74219

Final solution for Intel card Ambient Occlusion in T43987.

Forgot to account for offscreen case in addition to compositing

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

M	source/blender/gpu/intern/gpu_compositing.c
M	source/blender/gpu/intern/gpu_extensions.c

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

diff --git a/source/blender/gpu/intern/gpu_compositing.c b/source/blender/gpu/intern/gpu_compositing.c
index bf3d175..2bafee0 100644
--- a/source/blender/gpu/intern/gpu_compositing.c
+++ b/source/blender/gpu/intern/gpu_compositing.c
@@ -724,7 +724,7 @@ bool GPU_fx_do_composite_pass(GPUFX *fx, float projmat[4][4], bool is_persp, str
 			sample_params[1] = fx->gbuffer_dim[0] / 64.0;
 			sample_params[2] = fx->gbuffer_dim[1] / 64.0;
 
-			ssao_params[3] = (passes_left == 1) ? dfdyfac[0] : dfdyfac[1];
+			ssao_params[3] = (passes_left == 1 && !ofs) ? dfdyfac[0] : dfdyfac[1];
 
 			ssao_uniform = GPU_shader_get_uniform(ssao_shader, "ssao_params");
 			ssao_color_uniform = GPU_shader_get_uniform(ssao_shader, "ssao_color");
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index 976a65a..0fcdd87 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -263,20 +263,13 @@ void gpu_extensions_init(void)
 		GG.dfdyfactors[0] = 1.0;
 		GG.dfdyfactors[1] = -1.0;
 	}
-	else if (GG.device == GPU_DEVICE_INTEL && GG.os == GPU_OS_WIN) {
-		if (strstr(version, "4.0.0 - Build 9.18.10.3165"))
-		{
-			GG.dfdyfactors[0] = -1.0;
-			GG.dfdyfactors[1] = 1.0;
-		}
-		else if (strstr(version, "3.1.0 - Build 9.17.10.4101")) {
-			GG.dfdyfactors[0] = -1.0;
-			GG.dfdyfactors[1] = -1.0;
-		}
-		else {
-			GG.dfdyfactors[0] = 1.0;
-			GG.dfdyfactors[1] = 1.0;
-		}
+	else if (GG.device == GPU_DEVICE_INTEL && GG.os == GPU_OS_WIN  &&
+	        (strstr(version, "4.0.0 - Build 9.18.10.3165") ||
+	         strstr(version, "3.1.0 - Build 9.17.10.3347") ||
+	         strstr(version, "3.1.0 - Build 9.17.10.4101")))
+	{
+		GG.dfdyfactors[0] = -1.0;
+		GG.dfdyfactors[1] = 1.0;
 	}
 	else {
 		GG.dfdyfactors[0] = 1.0;




More information about the Bf-blender-cvs mailing list