bump up shadowtex resolution. change bias values. ideal for laptop for now

This commit is contained in:
Franchioping 2025-12-04 17:32:53 +00:00
parent 84f1903177
commit 5ae4b38e16
2 changed files with 7 additions and 2 deletions

View File

@ -10,7 +10,7 @@ use rapier3d::prelude::*;
use strum::IntoEnumIterator;
mod ui;
const DEPTH_MAP_SIZE: u32 = 512;
const DEPTH_MAP_SIZE: u32 = 1024;
const LIGHT_PROJECTION_SIZE: f32 = 40.0;
const LIGHT_NEAR: f32 = 50.0;

View File

@ -46,7 +46,12 @@ float calculate_shadow() {
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;
for (int x = -range; x <= range; x++)