Here is a fix for the DLAA filter on AMD cards. Read the comments in my pseudo diff.
Code:
float height = bgl_RenderedTextureHeight; //texture height
float oneThird = 1.0 / 3.0; //<--put this line below the one above.
... //<--snip
float avg(const in vec3 value) //<--was wrong return type (vec3).
{
// static const float oneThird = 1.0 / 3.0; //<-- there is no 'static' in glsl. I declared oneThird in global scope which works as good as static. :)
return dot(value.xyz, vec3(oneThird, oneThird, oneThird) );
}
This fixes the ssao compilation. Thought i still have black artifacts all over the screen if i turn ssao on. Maybe sampling outside 2DSampler boundaries causes this? Don't know, i didn't study the code, just fixed the reported errors.
Code:
vec3 black = vec3(0.0,0.0,0.0);
vec3 treshold = vec3(0.2,0.2,0.2); //<-- glsl requires explicit type casting vec3.
The demo as such is pretty impressive. I noticed the weird reflections of the white windows when standing at the end of the coridor, looking left and right you can still see the reflections of the windows. But the overall illusion is pretty good.
Bookmarks