
#ifndef RENDER_CONTEXT_H
#define RENDER_CONTEXT_H

#include "defs.glslh"

UNIFORM(512) mat4 r_modelViewMatrix;
UNIFORM(513) mat4 r_projectionMatrix;
UNIFORM(514) mat4 r_textureMatrix;
UNIFORM(515) vec4 r_color;

// Active viewport, i.e. the region we're rendering into.
// xy = offset, zw = width and height.
// Units are real pixels.
UNIFORM(516) vec4 r_viewport;

// Size(s) of output buffer(s) we're rendering into, in real pixels.
// A size of 0,0 means the buffer is not attached.
//
// Note that r_colorOutputSizes is not a direct mapping to framebuffer attachments;
// it is affected by the output -> attachment mapping (see r_framebuffer_set_output_attachments).
// This means that r_colorOutputSizes[N] always corresponds to fragment shader output #N, which
// is probably what you'd expect.
UNIFORM(517) vec2 r_colorOutputSizes[4];  // NOTE: should match FRAMEBUFFER_MAX_OUTPUTS in renderer/api.h
UNIFORM(521) vec2 r_depthOutputSize;

#endif
