Monad Engine da02fba2
> Undercity Codex_
Loading...
Searching...
No Matches
RenderTarget.h File Reference

Offscreen FBO with colour, view-normal and depth attachments. More...

#include "GL/glew.h"
+ Include dependency graph for RenderTarget.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  mnd::RenderTarget
 Offscreen FBO with MRT colour + sampleable depth for low-resolution rendering. More...
 

Namespaces

namespace  mnd
 

Enumerations

enum class  mnd::BlitMode : int { mnd::Color = 0 , mnd::SplatRed = 1 , mnd::DecodeNrm = 2 }
 Blit modes for BlitNearest. More...
 

Functions

void mnd::BlitNearest (GLuint srcTexture, int dstW, int dstH, BlitMode mode)
 

Detailed Description

Offscreen FBO with colour, view-normal and depth attachments.

Used to implement the engine's "internal resolution" pixelation effect. Render the scene at a small size (e.g. 320x240) into the RenderTarget, then BlitNearest() it into the window framebuffer. The non-filtered upscale produces crisp PSX-era chunky pixels.

The second colour attachment receives view-space normals encoded as N*0.5+0.5 (RGBA8) so the outline post-pass can do depth+normal edge detection. Depth is a sampleable texture rather than a renderbuffer for the same reason.

Definition in file RenderTarget.h.