mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 13:58:51 +02:00
Merge pull request #1071 from ey6es/master
Fixed glow flickering, tweak circling again.
This commit is contained in:
commit
9e68c5dfba
2 changed files with 3 additions and 3 deletions
|
@ -1128,7 +1128,7 @@ void MyAvatar::updateChatCircle(float deltaTime) {
|
||||||
|
|
||||||
// remove members whose accumulated circles are too far away to influence us
|
// remove members whose accumulated circles are too far away to influence us
|
||||||
const float CIRCUMFERENCE_PER_MEMBER = 0.5f;
|
const float CIRCUMFERENCE_PER_MEMBER = 0.5f;
|
||||||
const float CIRCLE_INFLUENCE_SCALE = 1.5f;
|
const float CIRCLE_INFLUENCE_SCALE = 2.0f;
|
||||||
for (int i = sortedAvatars.size() - 1; i >= 0; i--) {
|
for (int i = sortedAvatars.size() - 1; i >= 0; i--) {
|
||||||
float radius = (CIRCUMFERENCE_PER_MEMBER * (i + 2)) / PI_TIMES_TWO;
|
float radius = (CIRCUMFERENCE_PER_MEMBER * (i + 2)) / PI_TIMES_TWO;
|
||||||
if (glm::distance(_position, sortedAvatars[i].accumulatedCenter) > radius * CIRCLE_INFLUENCE_SCALE) {
|
if (glm::distance(_position, sortedAvatars[i].accumulatedCenter) > radius * CIRCLE_INFLUENCE_SCALE) {
|
||||||
|
@ -1183,7 +1183,7 @@ void MyAvatar::updateChatCircle(float deltaTime) {
|
||||||
glm::vec3 targetPosition = center + (front * sinf(targetAngle) + right * cosf(targetAngle)) * radius;
|
glm::vec3 targetPosition = center + (front * sinf(targetAngle) + right * cosf(targetAngle)) * radius;
|
||||||
|
|
||||||
// approach the target position
|
// approach the target position
|
||||||
const float APPROACH_RATE = 0.025f;
|
const float APPROACH_RATE = 0.05f;
|
||||||
_position = glm::mix(_position, targetPosition, APPROACH_RATE);
|
_position = glm::mix(_position, targetPosition, APPROACH_RATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ QOpenGLFramebufferObject* GlowEffect::render(bool toTexture) {
|
||||||
|
|
||||||
QOpenGLFramebufferObject* destFBO = toTexture ?
|
QOpenGLFramebufferObject* destFBO = toTexture ?
|
||||||
Application::getInstance()->getTextureCache()->getSecondaryFramebufferObject() : NULL;
|
Application::getInstance()->getTextureCache()->getSecondaryFramebufferObject() : NULL;
|
||||||
if (_isEmpty) {
|
if (_isEmpty && _renderMode != DIFFUSE_ADD_MODE) {
|
||||||
// copy the primary to the screen
|
// copy the primary to the screen
|
||||||
if (QOpenGLFramebufferObject::hasOpenGLFramebufferBlit()) {
|
if (QOpenGLFramebufferObject::hasOpenGLFramebufferBlit()) {
|
||||||
QOpenGLFramebufferObject::blitFramebuffer(destFBO, primaryFBO);
|
QOpenGLFramebufferObject::blitFramebuffer(destFBO, primaryFBO);
|
||||||
|
|
Loading…
Reference in a new issue