mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Add HDR post-process FBO pipeline with 4x MSAA
Render the world into an off-screen MSAA RGBA16F framebuffer, resolve to a regular texture, then blit to screen via a fullscreen quad shader. This sets up the infrastructure for future HDR tonemapping and SSAO (depth texture preserved for sampling). Currently a passthrough until HDR light sources are added. Login screen bypasses the FBO and renders directly to the default framebuffer.
This commit is contained in:
parent
aeccddddeb
commit
1f672e1d73
2 changed files with 222 additions and 1 deletions
|
|
@ -158,6 +158,22 @@ private:
|
|||
uint32_t underwaterOverlayVAO = 0;
|
||||
uint32_t underwaterOverlayVBO = 0;
|
||||
|
||||
// Post-process FBO pipeline (HDR MSAA → resolve → tonemap)
|
||||
uint32_t sceneFBO = 0; // MSAA render target
|
||||
uint32_t sceneColorRBO = 0; // GL_RGBA16F multisampled renderbuffer
|
||||
uint32_t sceneDepthRBO = 0; // GL_DEPTH_COMPONENT24 multisampled renderbuffer
|
||||
uint32_t resolveFBO = 0; // Non-MSAA resolve target
|
||||
uint32_t resolveColorTex = 0; // GL_RGBA16F resolved texture (sampled by post-process)
|
||||
uint32_t resolveDepthTex = 0; // GL_DEPTH_COMPONENT24 resolved texture (for future SSAO)
|
||||
uint32_t screenQuadVAO = 0;
|
||||
uint32_t screenQuadVBO = 0;
|
||||
std::unique_ptr<Shader> postProcessShader;
|
||||
int fbWidth = 0, fbHeight = 0;
|
||||
|
||||
void initPostProcess(int w, int h);
|
||||
void resizePostProcess(int w, int h);
|
||||
void shutdownPostProcess();
|
||||
|
||||
pipeline::AssetManager* cachedAssetManager = nullptr;
|
||||
uint32_t currentZoneId = 0;
|
||||
std::string currentZoneName;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue