2019-05-12 09:10:13 +00:00
|
|
|
layout (std140)
|
|
|
|
uniform u_globals {
|
|
|
|
mat4 view_mat;
|
|
|
|
mat4 proj_mat;
|
2020-01-21 12:57:59 +00:00
|
|
|
mat4 all_mat;
|
2019-05-12 09:10:13 +00:00
|
|
|
vec4 cam_pos;
|
2020-07-02 20:10:22 +00:00
|
|
|
vec4 focus_off;
|
2019-05-12 09:10:13 +00:00
|
|
|
vec4 focus_pos;
|
|
|
|
vec4 view_distance;
|
|
|
|
vec4 time_of_day;
|
2020-07-02 20:10:22 +00:00
|
|
|
vec4 sun_dir;
|
|
|
|
vec4 moon_dir;
|
2019-05-12 09:10:13 +00:00
|
|
|
vec4 tick;
|
|
|
|
vec4 screen_res;
|
2019-09-25 12:00:00 +00:00
|
|
|
uvec4 light_shadow_count;
|
2020-05-17 03:59:00 +00:00
|
|
|
vec4 shadow_proj_factors;
|
2019-08-16 14:58:14 +00:00
|
|
|
uvec4 medium;
|
2019-09-26 10:43:03 +00:00
|
|
|
ivec4 select_pos;
|
2020-02-13 12:28:03 +00:00
|
|
|
vec4 gamma;
|
2020-04-07 22:50:01 +00:00
|
|
|
// 0 - FirstPerson
|
|
|
|
// 1 - ThirdPerson
|
2020-04-04 19:36:55 +00:00
|
|
|
uint cam_mode;
|
2020-04-25 13:04:30 +00:00
|
|
|
float sprite_render_distance;
|
2019-05-12 09:10:13 +00:00
|
|
|
};
|
2020-04-07 22:50:01 +00:00
|
|
|
|
|
|
|
// Specifies the pattern used in the player dithering
|
|
|
|
mat4 threshold_matrix = mat4(
|
|
|
|
vec4(1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0),
|
|
|
|
vec4(13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0),
|
|
|
|
vec4(4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0),
|
|
|
|
vec4(16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0)
|
|
|
|
);
|
|
|
|
float distance_divider = 2;
|
2020-04-25 13:04:30 +00:00
|
|
|
float shadow_dithering = 0.5;
|