2 * Copyright (C) 2021-2022 Mt.ZERO Software, Harry Godden - All Rights Reserved
9 #include "shaders/blit.h"
10 #include "shaders/blitblur.h"
11 #include "shaders/blitcolour.h"
12 #include "shaders/blit_transition.h"
14 #define WORKSHOP_PREVIEW_WIDTH 504
15 #define WORKSHOP_PREVIEW_HEIGHT 336
17 static f32 k_render_scale
= 1.0f
;
18 static i32 k_blur_effect
= 1;
19 static f32 k_blur_strength
= 0.3f
;
20 static f32 k_fov
= 0.86f
;
21 static f32 k_cam_height
= 0.8f
;
23 typedef struct framebuffer framebuffer
;
26 * All standard buffers used in rendering
28 static struct pipeline
{
41 const char *display_name
;
42 int resolution_div
, /* definition */
46 render_w
, /* runtime */
49 struct framebuffer_attachment
{
50 const char *display_name
;
52 enum framebuffer_attachment_type
{
53 k_framebuffer_attachment_type_none
,
54 k_framebuffer_attachment_type_texture
,
55 k_framebuffer_attachment_type_renderbuffer
,
56 k_framebuffer_attachment_type_texture_depth
60 enum framebuffer_quality_profile
{
61 k_framebuffer_quality_all
,
62 k_framebuffer_quality_high_only
66 GLenum internalformat
,
80 extern framebuffers
[];
82 void render_init(void);
83 void render_fsquad(void);
84 void render_fsquad1(void);
85 void render_fsquad2(void);
86 void render_view_framebuffer_ui(void);
87 void render_fb_bind_texture( framebuffer
*fb
, int attachment
, int slot
);
88 void render_fb_inverse_ratio( framebuffer
*fb
, v2f inverse
);
89 void render_fb_get_current_res( struct framebuffer
*fb
, int *x
, int *y
);
90 void render_fb_bind( framebuffer
*fb
, int use_scaling
);
91 void render_fb_bind_texture( framebuffer
*fb
, int attachment
, int slot
);
92 void render_fb_allocate( struct framebuffer
*fb
);
93 void render_fb_resize(void);