From 47592b4e6de28e55fa97618dc99d679793a8c685 Mon Sep 17 00:00:00 2001 From: mcrcortex <18544518+MCRcortex@users.noreply.github.com> Date: Wed, 9 Apr 2025 18:32:58 +1000 Subject: [PATCH] qq --- .../cortex/voxy/client/core/rendering/util/HiZBuffer.java | 2 +- src/main/resources/assets/voxy/shaders/hiz/blit.fsh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/me/cortex/voxy/client/core/rendering/util/HiZBuffer.java b/src/main/java/me/cortex/voxy/client/core/rendering/util/HiZBuffer.java index 118ea128..4556a8db 100644 --- a/src/main/java/me/cortex/voxy/client/core/rendering/util/HiZBuffer.java +++ b/src/main/java/me/cortex/voxy/client/core/rendering/util/HiZBuffer.java @@ -44,7 +44,7 @@ public class HiZBuffer { private void alloc(int width, int height) { this.levels = (int)Math.ceil(Math.log(Math.max(width, height))/Math.log(2)); //We dont care about e.g. 1x1 size texture since you dont get meshlets that big to cover such a large area - this.levels -= 1;//Arbitrary size, shinks the max level by alot and saves a significant amount of processing time + //this.levels -= 1;//Arbitrary size, shinks the max level by alot and saves a significant amount of processing time // (could probably increase it to be defined by a max meshlet coverage computation thing) //GL_DEPTH_COMPONENT32F //Cant use this as it does not match the depth format of the provided depth buffer diff --git a/src/main/resources/assets/voxy/shaders/hiz/blit.fsh b/src/main/resources/assets/voxy/shaders/hiz/blit.fsh index 008cdc78..a84d93f3 100644 --- a/src/main/resources/assets/voxy/shaders/hiz/blit.fsh +++ b/src/main/resources/assets/voxy/shaders/hiz/blit.fsh @@ -11,8 +11,8 @@ void main() { //TODO, do it so that for the first 2,3 levels if 1 (or maybe even 2 (on the first layer)) pixels are air, just ignore that // this is to stop issues with 1 pixel gaps bvec4 cv = lessThanEqual(vec4(0.99999999), depths); - if (any(cv) && !all(cv)) { - depths = mix(vec4(1.0f), depths, cv); - } + //if (any(cv) && !all(cv)) { + // depths = mix(vec4(1.0f), depths, cv); + //} gl_FragDepth = max(max(depths.x, depths.y), max(depths.z, depths.w)); // Write conservative depth. }