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