mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +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;
|
||||
current.x = 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 {
|
||||
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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue