mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 02:56:55 +02:00
Make sure the resolution level for ao is correct
This commit is contained in:
parent
dc40337dc1
commit
c5c51f2af2
3 changed files with 3 additions and 3 deletions
|
@ -227,7 +227,7 @@ void AmbientOcclusionEffect::setRadius(float radius) {
|
||||||
auto& current = _parametersBuffer.edit<Parameters>()._radiusInfo;
|
auto& current = _parametersBuffer.edit<Parameters>()._radiusInfo;
|
||||||
current.x = radius;
|
current.x = radius;
|
||||||
current.y = radius * radius;
|
current.y = radius * radius;
|
||||||
current.z = 1.0f / pow(radius, 6.0);
|
current.z = 1.0f / pow((double)radius, 6.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ private:
|
||||||
class Parameters {
|
class Parameters {
|
||||||
public:
|
public:
|
||||||
// Resolution info
|
// 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}
|
// 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 };
|
glm::vec4 _radiusInfo{ 0.5, 0.5 * 0.5, 1.0 / (0.25 * 0.25 * 0.25), 1.0 };
|
||||||
// Dithering info
|
// Dithering info
|
||||||
|
|
|
@ -103,7 +103,7 @@ private:
|
||||||
gpu::TexturePointer _occlusionBlurredTexture;
|
gpu::TexturePointer _occlusionBlurredTexture;
|
||||||
|
|
||||||
QSize _frameBufferSize{ 100, 100 };
|
QSize _frameBufferSize{ 100, 100 };
|
||||||
int _AOResolutionLevel = 0;
|
int _AOResolutionLevel = 1; // AO perform at half res
|
||||||
|
|
||||||
// Resize/reallocate the buffers used for AO
|
// Resize/reallocate the buffers used for AO
|
||||||
// the size of the AO buffers is scaled by the AOResolutionScale;
|
// the size of the AO buffers is scaled by the AOResolutionScale;
|
||||||
|
|
Loading…
Reference in a new issue