Changeset View
Changeset View
Standalone View
Standalone View
source/renderer/PostprocManager.h
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | public: | ||||
// @note CPostprocManager must be initialized first | // @note CPostprocManager must be initialized first | ||||
void ApplyPostproc(); | void ApplyPostproc(); | ||||
// Blits the final postprocessed texture to the system framebuffer. The system framebuffer | // Blits the final postprocessed texture to the system framebuffer. The system framebuffer | ||||
// is selected as the output buffer. Should be called before silhouette rendering. | // is selected as the output buffer. Should be called before silhouette rendering. | ||||
// @note CPostprocManager must be initialized first | // @note CPostprocManager must be initialized first | ||||
void ReleaseRenderOutput(); | void ReleaseRenderOutput(); | ||||
// Returns true if we render main scene in the MSAA framebuffer. | |||||
bool IsMultisampleEnabled() const; | |||||
// Resolves the MSAA framebuffer into the regular one. | |||||
void ResolveMultisampleFramebuffer(); | |||||
private: | private: | ||||
void CreateMultisampleBuffer(); | |||||
void DestroyMultisampleBuffer(); | |||||
// Two framebuffers, that we flip between at each shader pass. | // Two framebuffers, that we flip between at each shader pass. | ||||
GLuint m_PingFbo, m_PongFbo; | GLuint m_PingFbo, m_PongFbo; | ||||
// Unique color textures for the framebuffers. | // Unique color textures for the framebuffers. | ||||
GLuint m_ColorTex1, m_ColorTex2; | GLuint m_ColorTex1, m_ColorTex2; | ||||
// The framebuffers share a depth/stencil texture. | // The framebuffers share a depth/stencil texture. | ||||
Show All 12 Lines | private: | ||||
CShaderTechniquePtr m_PostProcTech; | CShaderTechniquePtr m_PostProcTech; | ||||
CStr m_SharpName; | CStr m_SharpName; | ||||
CShaderTechniquePtr m_SharpTech; | CShaderTechniquePtr m_SharpTech; | ||||
float m_Sharpness; | float m_Sharpness; | ||||
CStr m_AAName; | CStr m_AAName; | ||||
CShaderTechniquePtr m_AATech; | CShaderTechniquePtr m_AATech; | ||||
bool m_UsingMultisampleBuffer; | |||||
GLuint m_MultisampleFBO; | |||||
GLuint m_MultisampleColorTex, m_MultisampleDepthTex; | |||||
GLsizei m_MultisampleCount; | |||||
std::vector<GLsizei> m_AllowedSampleCounts; | |||||
// The current screen dimensions in pixels. | // The current screen dimensions in pixels. | ||||
int m_Width, m_Height; | int m_Width, m_Height; | ||||
// Is the postproc manager initialized? Buffers created? Default effect loaded? | // Is the postproc manager initialized? Buffers created? Default effect loaded? | ||||
bool m_IsInitialized; | bool m_IsInitialized; | ||||
// Creates blur textures at various scales, for bloom, DOF, etc. | // Creates blur textures at various scales, for bloom, DOF, etc. | ||||
Show All 26 Lines |
Wildfire Games · Phabricator