downgrade to v1.53
-> fix dark nights, but removes DH compat too
This commit is contained in:
@@ -1,14 +1,5 @@
|
||||
#version 120
|
||||
/* DRAWBUFFERS:34 */
|
||||
/*
|
||||
Sildur's Vibrant Shaders:
|
||||
https://www.patreon.com/Sildur
|
||||
https://sildurs-shaders.github.io/
|
||||
https://twitter.com/SildurFX
|
||||
|
||||
Permissions:
|
||||
You are not allowed to edit, copy code or share my shaderpack under a different name or claim it as yours.
|
||||
*/
|
||||
|
||||
#define gbuffers_shadows
|
||||
#define composite0
|
||||
@@ -971,13 +962,6 @@ vec3 YCoCg2RGB(vec3 c){
|
||||
return vec3(c.r+c.g-c.b, c.r + c.b, c.r - c.g - c.b);
|
||||
}
|
||||
|
||||
#ifdef DISTANT_HORIZONS
|
||||
uniform sampler2D dhDepthTex0;
|
||||
uniform sampler2D dhDepthTex1;
|
||||
uniform float dhNearPlane;
|
||||
uniform float dhFarPlane;
|
||||
#endif
|
||||
|
||||
void main() {
|
||||
|
||||
//sample half-resolution buffer with correct texture coordinates
|
||||
@@ -987,14 +971,7 @@ vec4 hr = pow(texture2D(composite,(floor(gl_FragCoord.xy/2.)*2+1.0)/vec2(viewWid
|
||||
float depth0 = texture2D(depthtex0, texcoord).x; //everything
|
||||
float depth1 = texture2D(depthtex1, texcoord).x; //transparency
|
||||
|
||||
//DH
|
||||
#ifndef DISTANT_HORIZONS
|
||||
bool sky = (depth0 >= 1.0);
|
||||
#else
|
||||
float DHdepth0 = texture2D(dhDepthTex0, texcoord).x;
|
||||
float DHdepth1 = texture2D(dhDepthTex1, texcoord).x;
|
||||
bool sky = (depth0 >= 1.0) && !(DHdepth1 < depth1);
|
||||
#endif
|
||||
|
||||
vec4 albedo = texture2D(colortex0,texcoord);
|
||||
vec3 normal = decode(texture2D(colortex1, texcoord).xy);
|
||||
@@ -1217,21 +1194,11 @@ if (ntc2.x < 1.0 && ntc2.y < 1.0 && ntc2.x > 0.0 && ntc2.y > 0.0){
|
||||
vec2 noisetc = ntc2 + deltatexcoord*raysNoise(ntc2) + deltatexcoord; //maybe doesnt need to be filtered
|
||||
bool underwater = (isEyeInWater == 1.0);
|
||||
|
||||
#ifndef DISTANT_HORIZONS
|
||||
for (int i = 0; i < grays_sample; i++) {
|
||||
float depth = underwater? texture2D(depthtex1, noisetc).x : texture2D(depthtex0, noisetc).x; //swap depth for now, wip
|
||||
noisetc += deltatexcoord;
|
||||
gr += dot(step(comp, depth), 1.0)*cdist(noisetc);
|
||||
}
|
||||
#else
|
||||
comp = 1.0-dhNearPlane/dhFarPlane/dhFarPlane;
|
||||
for (int i = 0; i < grays_sample; i++) {
|
||||
float depth = underwater? texture2D(dhDepthTex1, noisetc).x : texture2D(dhDepthTex0, noisetc).x;
|
||||
depth *= underwater? texture2D(depthtex1, noisetc).x : texture2D(depthtex0, noisetc).x; //swap depth for now, wip
|
||||
noisetc += deltatexcoord;
|
||||
gr += dot(step(comp, depth), 1.0)*cdist(noisetc);
|
||||
}
|
||||
#endif
|
||||
gr /= grays_sample;
|
||||
#endif
|
||||
#endif
|
||||
@@ -1247,12 +1214,7 @@ gr = 0.0;
|
||||
for (int i = -6; i < 7;i++) {
|
||||
for (int j = -6; j < 7 ;j++) {
|
||||
vec2 ij = vec2(i,j);
|
||||
#ifndef DISTANT_HORIZONS
|
||||
float depth = texture2D(depthtex0, ntc+lightPos + sign(ij)*sqrt(abs(ij))*vec2(0.006)).x;
|
||||
#else
|
||||
float depth = texture2D(dhDepthTex0, ntc+lightPos + sign(ij)*sqrt(abs(ij))*vec2(0.006)).x;
|
||||
depth *= texture2D(depthtex0, ntc+lightPos + sign(ij)*sqrt(abs(ij))*vec2(0.006)).x;
|
||||
#endif
|
||||
gr += dot(step(comp, depth), 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user