Final solution for Intel card Ambient Occlusion in T43987.

Forgot to account for offscreen case in addition to compositing
This commit is contained in:
Antony Riakiotakis 2015-05-18 22:05:38 +02:00
parent 598c2dffe9
commit 65328fadc3
2 changed files with 8 additions and 15 deletions

@ -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");

@ -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;