mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
46 lines
1.4 KiB
C++
46 lines
1.4 KiB
C++
#ifndef OPENMW_MWRENDER_TRANSPARENTPASS_H
|
|
#define OPENMW_MWRENDER_TRANSPARENTPASS_H
|
|
|
|
#include <array>
|
|
|
|
#include <osg/FrameBufferObject>
|
|
#include <osg/StateSet>
|
|
|
|
#include <osgUtil/RenderBin>
|
|
|
|
#include "postprocessor.hpp"
|
|
|
|
namespace Shader
|
|
{
|
|
class ShaderManager;
|
|
}
|
|
|
|
namespace MWRender
|
|
{
|
|
class TransparentDepthBinCallback : public osgUtil::RenderBin::DrawCallback
|
|
{
|
|
public:
|
|
TransparentDepthBinCallback(Shader::ShaderManager& shaderManager, bool postPass);
|
|
|
|
void drawImplementation(osgUtil::RenderBin* bin, osg::RenderInfo& renderInfo, osgUtil::RenderLeaf*& previous) override;
|
|
void dirtyFrame(int frameId);
|
|
void setupMultiviewDepthResolveBuffers(int frameId);
|
|
|
|
std::array<osg::ref_ptr<osg::FrameBufferObject>, 2> mFbo;
|
|
std::array<osg::ref_ptr<osg::FrameBufferObject>, 2> mMsaaFbo;
|
|
std::array<osg::ref_ptr<osg::FrameBufferObject>, 2> mOpaqueFbo;
|
|
|
|
std::array<osg::ref_ptr<osg::FrameBufferObject>, 2> mMultiviewDepthResolveLeftSource;
|
|
std::array<osg::ref_ptr<osg::FrameBufferObject>, 2> mMultiviewDepthResolveRightSource;
|
|
std::array<osg::ref_ptr<osg::FrameBufferObject>, 2> mMultiviewDepthResolveLeftTarget;
|
|
std::array<osg::ref_ptr<osg::FrameBufferObject>, 2> mMultiviewDepthResolveRightTarget;
|
|
|
|
private:
|
|
osg::ref_ptr<osg::StateSet> mStateSet;
|
|
bool mPostPass;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|