mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Scale shadow grid to multiple texels per grid cell to make it easier to examine
This commit is contained in:
parent
9b78d75f06
commit
b7096d9f2e
@ -266,7 +266,11 @@ void main() {
|
||||
vec3 two_up = f_pos + offset_two;
|
||||
vec3 two_down = f_pos - offset_two;
|
||||
|
||||
vec2 shadowTexSize = textureSize(sampler2D(t_directed_shadow_maps, s_directed_shadow_maps), 0);
|
||||
// Adjust this to change the size of the grid cells relative to the
|
||||
// number of shadow texels
|
||||
float grid_cell_to_texel_ratio = 32.0;
|
||||
|
||||
vec2 shadowTexSize = textureSize(sampler2D(t_directed_shadow_maps, s_directed_shadow_maps), 0) / grid_cell_to_texel_ratio;
|
||||
|
||||
vec4 one_up_shadow_tex = texture_mat * vec4(one_up, 1.0);
|
||||
vec2 oust_snap = floor(one_up_shadow_tex.xy * shadowTexSize / one_up_shadow_tex.w);
|
||||
|
Loading…
Reference in New Issue
Block a user