Make sure the resolution level for ao is correct

This commit is contained in:
samcake 2016-01-19 18:57:03 -08:00
parent dc40337dc1
commit c5c51f2af2
3 changed files with 3 additions and 3 deletions

View file

@ -227,7 +227,7 @@ void AmbientOcclusionEffect::setRadius(float radius) {
auto& current = _parametersBuffer.edit<Parameters>()._radiusInfo;
current.x = radius;
current.y = radius * radius;
current.z = 1.0f / pow(radius, 6.0);
current.z = 1.0f / pow((double)radius, 6.0);
}
}

View file

@ -91,7 +91,7 @@ private:
class Parameters {
public:
// Resolution info
glm::vec4 _resolutionInfo{ 1.0, 1.0, 1.0, 1.0 };
glm::vec4 _resolutionInfo{ -1.0, 0.0, 0.0, 0.0 };
// radius info is { R, R^2, 1 / R^6, ObscuranceScale}
glm::vec4 _radiusInfo{ 0.5, 0.5 * 0.5, 1.0 / (0.25 * 0.25 * 0.25), 1.0 };
// Dithering info

View file

@ -103,7 +103,7 @@ private:
gpu::TexturePointer _occlusionBlurredTexture;
QSize _frameBufferSize{ 100, 100 };
int _AOResolutionLevel = 0;
int _AOResolutionLevel = 1; // AO perform at half res
// Resize/reallocate the buffers used for AO
// the size of the AO buffers is scaled by the AOResolutionScale;