bump up shadowtex resolution. change bias values. ideal for laptop for now
This commit is contained in:
parent
84f1903177
commit
5ae4b38e16
|
|
@ -10,7 +10,7 @@ use rapier3d::prelude::*;
|
||||||
use strum::IntoEnumIterator;
|
use strum::IntoEnumIterator;
|
||||||
mod ui;
|
mod ui;
|
||||||
|
|
||||||
const DEPTH_MAP_SIZE: u32 = 512;
|
const DEPTH_MAP_SIZE: u32 = 1024;
|
||||||
|
|
||||||
const LIGHT_PROJECTION_SIZE: f32 = 40.0;
|
const LIGHT_PROJECTION_SIZE: f32 = 40.0;
|
||||||
const LIGHT_NEAR: f32 = 50.0;
|
const LIGHT_NEAR: f32 = 50.0;
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,12 @@ float calculate_shadow() {
|
||||||
|
|
||||||
vec2 texelSize = 1.0 / textureSize(shadow_map, 0);
|
vec2 texelSize = 1.0 / textureSize(shadow_map, 0);
|
||||||
|
|
||||||
float shadow = 0;
|
float proj_depth = texture(shadow_map, proj_coords.xy).r;
|
||||||
|
// int show_shadow = current_depth - bias > proj_depth ? 0 : 1;
|
||||||
|
// if (show_shadow == 1) {
|
||||||
|
// return 1.0;
|
||||||
|
// }
|
||||||
|
float shadow = 0.0;
|
||||||
|
|
||||||
int range = (shadow_step_count - 1) / 2;
|
int range = (shadow_step_count - 1) / 2;
|
||||||
for (int x = -range; x <= range; x++)
|
for (int x = -range; x <= range; x++)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue