Funny very incorrect tinkering of culling
This commit is contained in:
@@ -6,6 +6,9 @@ package me.cortex.voxy.client.core.rendering.hierachical2;
|
||||
public class NodeCleaner {
|
||||
|
||||
|
||||
//Clears memory via invoking node manager, clear section or delete node
|
||||
// these should take hint parameters on if when removing section data, to store it in section cache or leave
|
||||
|
||||
public void setNodeMemoryUsage() {
|
||||
//Needs to bubble up information to all parents
|
||||
// also needs to update a tick/last seen time for node removal
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package me.cortex.voxy.client.core.shader;
|
||||
|
||||
//Mutates the frag shaders of the material, like a deferred material shader system
|
||||
public class ShaderSystem {
|
||||
}
|
||||
@@ -5,9 +5,12 @@ layout(location = 0) in vec2 uv;
|
||||
layout(binding = 0) uniform sampler2D depthTex;
|
||||
void main() {
|
||||
vec4 depths = textureGather(depthTex, uv, 0); // Get depth values from all surrounding texels.
|
||||
|
||||
//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(0), depths, cv);
|
||||
depths = mix(vec4(1.0f), depths, cv);
|
||||
}
|
||||
gl_FragDepth = max(max(depths.x, depths.y), max(depths.z, depths.w)); // Write conservative depth.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user