mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 00:03:39 +02:00
Deferred lighting tweaks.
This commit is contained in:
parent
7580a1da89
commit
bfaac9eae1
5 changed files with 17 additions and 19 deletions
|
@ -2895,21 +2895,12 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) {
|
|||
"Application::displaySide() ... AmbientOcclusion...");
|
||||
_ambientOcclusionEffect.render();
|
||||
}
|
||||
|
||||
_nodeBoundsDisplay.draw();
|
||||
|
||||
}
|
||||
|
||||
bool mirrorMode = (whichCamera.getInterpolatedMode() == CAMERA_MODE_MIRROR);
|
||||
{
|
||||
PerformanceTimer perfTimer("avatars");
|
||||
|
||||
_avatarManager.renderAvatars(mirrorMode ? Avatar::MIRROR_RENDER_MODE : Avatar::NORMAL_RENDER_MODE, selfAvatarOnly);
|
||||
|
||||
//Render the sixense lasers
|
||||
if (Menu::getInstance()->isOptionChecked(MenuOption::SixenseLasers)) {
|
||||
_myAvatar->renderLaserPointers();
|
||||
}
|
||||
_avatarManager.renderAvatars(mirrorMode ? Avatar::MIRROR_RENDER_MODE : Avatar::NORMAL_RENDER_MODE, selfAvatarOnly);
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -2917,7 +2908,14 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) {
|
|||
_deferredLightingEffect.render();
|
||||
}
|
||||
|
||||
//Render the sixense lasers
|
||||
if (Menu::getInstance()->isOptionChecked(MenuOption::SixenseLasers)) {
|
||||
_myAvatar->renderLaserPointers();
|
||||
}
|
||||
|
||||
if (!selfAvatarOnly) {
|
||||
_nodeBoundsDisplay.draw();
|
||||
|
||||
// Render the world box
|
||||
if (whichCamera.getMode() != CAMERA_MODE_MIRROR && Menu::getInstance()->isOptionChecked(MenuOption::Stats) &&
|
||||
Menu::getInstance()->isOptionChecked(MenuOption::UserInterface)) {
|
||||
|
|
|
@ -185,10 +185,14 @@ void Head::relaxLean(float deltaTime) {
|
|||
|
||||
void Head::render(float alpha, Model::RenderMode mode) {
|
||||
if (_faceModel.render(alpha, mode) && _renderLookatVectors && mode != Model::SHADOW_RENDER_MODE) {
|
||||
renderLookatVectors(_leftEyePosition, _rightEyePosition, _lookAtPosition);
|
||||
Application::getInstance()->getDeferredLightingEffect()->addPostLightingRenderable(this);
|
||||
}
|
||||
}
|
||||
|
||||
void Head::renderPostLighting() {
|
||||
renderLookatVectors(_leftEyePosition, _rightEyePosition, _lookAtPosition);
|
||||
}
|
||||
|
||||
void Head::setScale (float scale) {
|
||||
if (_scale == scale) {
|
||||
return;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "FaceModel.h"
|
||||
#include "InterfaceConfig.h"
|
||||
#include "world.h"
|
||||
#include "renderer/DeferredLightingEffect.h"
|
||||
|
||||
enum eyeContactTargets {
|
||||
LEFT_EYE,
|
||||
|
@ -35,7 +36,7 @@ const float EYE_EAR_GAP = 0.08f;
|
|||
class Avatar;
|
||||
class ProgramObject;
|
||||
|
||||
class Head : public HeadData {
|
||||
class Head : public HeadData, public PostLightingRenderable {
|
||||
public:
|
||||
Head(Avatar* owningAvatar);
|
||||
|
||||
|
@ -43,6 +44,7 @@ public:
|
|||
void reset();
|
||||
void simulate(float deltaTime, bool isMine, bool billboard = false);
|
||||
void render(float alpha, Model::RenderMode mode);
|
||||
virtual void renderPostLighting();
|
||||
void setScale(float scale);
|
||||
void setPosition(glm::vec3 position) { _position = position; }
|
||||
void setAverageLoudness(float averageLoudness) { _averageLoudness = averageLoudness; }
|
||||
|
|
|
@ -471,9 +471,6 @@ bool Model::render(float alpha, RenderMode mode) {
|
|||
return true;
|
||||
}
|
||||
|
||||
void Model::renderPostLighting() {
|
||||
}
|
||||
|
||||
Extents Model::getBindExtents() const {
|
||||
if (!isActive()) {
|
||||
return Extents();
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include <AnimationCache.h>
|
||||
|
||||
#include "DeferredLightingEffect.h"
|
||||
#include "GeometryCache.h"
|
||||
#include "InterfaceConfig.h"
|
||||
#include "JointState.h"
|
||||
|
@ -38,7 +37,7 @@ typedef QWeakPointer<AnimationHandle> WeakAnimationHandlePointer;
|
|||
const int MAX_LOCAL_LIGHTS = 2;
|
||||
|
||||
/// A generic 3D model displaying geometry loaded from a URL.
|
||||
class Model : public QObject, public PhysicsEntity, public PostLightingRenderable {
|
||||
class Model : public QObject, public PhysicsEntity {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -92,8 +91,6 @@ public:
|
|||
|
||||
bool render(float alpha = 1.0f, RenderMode mode = DEFAULT_RENDER_MODE);
|
||||
|
||||
virtual void renderPostLighting();
|
||||
|
||||
/// Sets the URL of the model to render.
|
||||
/// \param fallback the URL of a fallback model to render if the requested model fails to load
|
||||
/// \param retainCurrent if true, keep rendering the current model until the new one is loaded
|
||||
|
|
Loading…
Reference in a new issue