veloren/assets/voxygen/shaders/include/globals.glsl

32 lines
758 B
Plaintext
Raw Normal View History

layout (std140)
uniform u_globals {
mat4 view_mat;
mat4 proj_mat;
2020-01-21 12:57:59 +00:00
mat4 all_mat;
vec4 cam_pos;
vec4 focus_pos;
vec4 view_distance;
vec4 time_of_day;
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;
// 0 - FirstPerson
// 1 - ThirdPerson
2020-04-04 19:36:55 +00:00
uint cam_mode;
float sprite_render_distance;
};
// 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;
float shadow_dithering = 0.5;