1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-05 13:45:35 +00:00
openmw/apps/openmw/mwrender/postprocessor.hpp
madsbuvi dd5901d351 Initial commit
Multiview shaders.

Refactor Frustum management

Rewrite shared shadow map

cull mask should respect stereo

Stereo savegame screencap

LocalMap refactoring

use the vertex buffer hint instead of the display list patch to enable/disable display lists

Character preview fixes
2022-04-28 21:05:34 +02:00

56 lines
1.4 KiB
C++

#ifndef OPENMW_MWRENDER_POSTPROCESSOR_H
#define OPENMW_MWRENDER_POSTPROCESSOR_H
#include <osg/Texture2D>
#include <osg/Group>
#include <osg/FrameBufferObject>
#include <osg/Camera>
#include <osg/ref_ptr>
#include <memory>
namespace osgViewer
{
class Viewer;
}
namespace Stereo
{
class MultiviewFramebuffer;
}
namespace MWRender
{
class PostProcessor : public osg::Referenced
{
public:
PostProcessor(osgViewer::Viewer* viewer, osg::Group* rootNode);
auto getMsaaFbo() { return mMsaaFbo; }
auto getFbo() { return mFbo; }
auto getFirstPersonRBProxy() { return mFirstPersonDepthRBProxy; }
osg::ref_ptr<osg::Texture2D> getOpaqueDepthTex() { return mOpaqueDepthTex; }
void resize(int width, int height);
private:
void createTexturesAndCamera(int width, int height);
osgViewer::Viewer* mViewer;
osg::ref_ptr<osg::Group> mRootNode;
osg::ref_ptr<osg::Camera> mHUDCamera;
std::shared_ptr<Stereo::MultiviewFramebuffer> mMultiviewFbo;
osg::ref_ptr<osg::FrameBufferObject> mMsaaFbo;
osg::ref_ptr<osg::FrameBufferObject> mFbo;
osg::ref_ptr<osg::RenderBuffer> mFirstPersonDepthRBProxy;
osg::ref_ptr<osg::Texture2D> mSceneTex;
osg::ref_ptr<osg::Texture2D> mDepthTex;
osg::ref_ptr<osg::Texture2D> mOpaqueDepthTex;
};
}
#endif