2022-05-14 01:58:00 +00:00
|
|
|
#ifndef OPENMW_MWRENDER_TRANSPARENTPASS_H
|
|
|
|
#define OPENMW_MWRENDER_TRANSPARENTPASS_H
|
|
|
|
|
|
|
|
#include <array>
|
2022-08-17 16:44:04 +00:00
|
|
|
#include <memory>
|
2022-05-14 01:58:00 +00:00
|
|
|
|
|
|
|
#include <osg/FrameBufferObject>
|
|
|
|
#include <osg/StateSet>
|
|
|
|
|
|
|
|
#include <osgUtil/RenderBin>
|
|
|
|
|
|
|
|
namespace Shader
|
|
|
|
{
|
|
|
|
class ShaderManager;
|
|
|
|
}
|
|
|
|
|
2022-07-11 13:59:56 +00:00
|
|
|
namespace Stereo
|
|
|
|
{
|
|
|
|
class MultiviewFramebufferResolve;
|
|
|
|
}
|
|
|
|
|
2022-05-14 01:58:00 +00:00
|
|
|
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;
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
2022-07-11 13:59:56 +00:00
|
|
|
std::array<std::unique_ptr<Stereo::MultiviewFramebufferResolve>, 2> mMultiviewResolve;
|
2022-06-21 15:55:06 +00:00
|
|
|
|
2022-05-14 01:58:00 +00:00
|
|
|
private:
|
|
|
|
osg::ref_ptr<osg::StateSet> mStateSet;
|
|
|
|
bool mPostPass;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-06-21 15:55:06 +00:00
|
|
|
#endif
|