Removed unnecessary shader code

This commit is contained in:
Joshua Barretto 2023-10-17 14:42:07 +01:00
parent bf92d0287b
commit 8036ffa374
2 changed files with 0 additions and 3 deletions

View File

@ -85,7 +85,6 @@ void main() {
float voxelize_factor = clamp(1.0 - (distance(focus_pos.xy, f_pos.xy) - view_distance.x) * (1.0 / VOXELIZE_DIST), 0, 1.0);
vec3 cam_dir = cam_to_frag;
#ifdef EXPERIMENTAL_NOLODVOXELS
f_ao = 1.0;
vec3 side_norm = normalize(vec3(f_norm.xy, 0));
vec3 top_norm = vec3(0, 0, 1);
voxel_norm = normalize(mix(side_norm, top_norm, cam_dir.z));

View File

@ -120,13 +120,11 @@ void main() {
vec3 view_dir = -cam_to_frag;
float f_ao = 1.0;
vec3 voxel_norm = f_norm;
const float VOXELIZE_DIST = 2000;
float voxelize_factor = clamp(1.0 - (distance(focus_pos.xy, f_pos.xy) - view_distance.x) * (1.0 / VOXELIZE_DIST), 0, 1);
vec3 cam_dir = cam_to_frag;
#ifdef EXPERIMENTAL_NOLODVOXELS
f_ao = 1.0;
vec3 side_norm = normalize(vec3(my_norm.xy, 0.01));
vec3 top_norm = vec3(0, 0, 1);
voxel_norm = normalize(mix(side_norm, top_norm, max(cam_dir.z, 0.0)));