Chandler
Chandler
Explore posts from servers
DHDistant Horizons
Created by Chandler on 8/23/2024 in #bug-report
Transparent LOD Blocks rendering in front of everything else with Vertex Shader
for future reference this is dh_water.fsh and basically all it's doing is the depth check and nothing more so just adding this stuff to other versions of dh_water should fix it
10 replies
DHDistant Horizons
Created by Chandler on 8/23/2024 in #bug-report
Transparent LOD Blocks rendering in front of everything else with Vertex Shader
#version 120 compatibility float linearizeDepth(const in float d, const in float zNear, const in float zFar) { float z_n = 2.0 * d - 1.0; return 2.0 * zNear * zFar / (zFar + zNear - z_n * (zFar - zNear)); } uniform sampler2D depthtex0; uniform float dhNearPlane; uniform float dhFarPlane; varying vec4 color; uniform float near; uniform float far; uniform float farPlane; void main() { float depth = texelFetch(depthtex0, ivec2(gl_FragCoord.xy), 0).r; float depthL = linearizeDepth(depth, near, farPlane); float depthDhL = linearizeDepth(gl_FragCoord.z, dhNearPlane, dhFarPlane);
if (depthL < depthDhL && depth < 1.0) {discard; return;} gl_FragData[0] = color; }
10 replies
DHDistant Horizons
Created by Chandler on 8/23/2024 in #bug-report
Transparent LOD Blocks rendering in front of everything else with Vertex Shader
will look into these solutions later and mark it resolved if it works
10 replies
DHDistant Horizons
Created by Chandler on 6/26/2024 in #help-me
How do I make a shader compatible?
8 replies