From 8036ffa37437a98528a64431bee0b9cea99bca03 Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Tue, 17 Oct 2023 14:42:07 +0100 Subject: [PATCH] Removed unnecessary shader code --- assets/voxygen/shaders/lod-object-frag.glsl | 1 - assets/voxygen/shaders/lod-terrain-frag.glsl | 2 -- 2 files changed, 3 deletions(-) diff --git a/assets/voxygen/shaders/lod-object-frag.glsl b/assets/voxygen/shaders/lod-object-frag.glsl index 33b991155b..e287d25182 100644 --- a/assets/voxygen/shaders/lod-object-frag.glsl +++ b/assets/voxygen/shaders/lod-object-frag.glsl @@ -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)); diff --git a/assets/voxygen/shaders/lod-terrain-frag.glsl b/assets/voxygen/shaders/lod-terrain-frag.glsl index c31fdb3b56..889595d995 100644 --- a/assets/voxygen/shaders/lod-terrain-frag.glsl +++ b/assets/voxygen/shaders/lod-terrain-frag.glsl @@ -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)));