diff --git a/shaders/info/buffers.txt b/shaders/info/buffers.txt index 0453f215..ccff7cf5 100644 --- a/shaders/info/buffers.txt +++ b/shaders/info/buffers.txt @@ -4,7 +4,7 @@ shadowcolor1 RG32UI 1.0 R: rsm-color; G: normal-XYZ, sss* colortex2 RGBA32 1.0 deferred= R: color; G: normal; B: specular; A: lighting colortex3 R16F 1.0 AO colortex4 RGB16F 1.0 pre-exposed HDR scene -colortex5 RGBA16F 0.25 HDR previous frame = RGB: pre-exposed HDR, A: Log Luminance +colortex5 RGBA16F 0.25 HDR previous frame [RGB: pre-exposed HDR, A: Log Luminance] colortex6 R16F 0.25 Log Luminance colortex7 RGB16F 1.0 HDR transparent / VL / bloom tiles diff --git a/shaders/lib/lighting/pbr.glsl b/shaders/lib/lighting/pbr.glsl index 2b2288a9..809d0ca1 100644 --- a/shaders/lib/lighting/pbr.glsl +++ b/shaders/lib/lighting/pbr.glsl @@ -198,7 +198,7 @@ sssDist = max(sssDist, contactLightDist); float maxDist = SSS_MAXDIST * material.scattering; - float contactSSS = material.scattering * max(1.0 - sssDist / maxDist, 0.0); + float contactSSS = 0.7 * pow2(material.scattering) * max(1.0 - contactLightDist / maxDist, 0.0); shadowSSS = mix(shadowSSS, contactSSS, contactShadowMix); //shadowSSS *= mix(1.0, contactShadow, saturate(contactLightDist / (SSS_MAXDIST * material.scattering))); #endif @@ -301,7 +301,8 @@ iblSpec *= (1.0 - roughL) * reflectColor * occlusion; float iblFmax = max(max(iblF.x, iblF.y), iblF.z); - final.a += iblFmax * max(1.0 - final.a, 0.0); + //final.a += iblFmax * max(1.0 - final.a, 0.0); + final.a = min(final.a + iblFmax * exposure * final.a, 1.0); } #endif @@ -360,7 +361,7 @@ if (NoLm > EPSILON) { float NoHm = max(dot(viewNormal, halfDir), 0.0); - vec3 sunSpec = GetSpecularBRDF(sunF, NoVm, NoLm, NoHm, roughL) * skyLightColorFinal * skyLight2 * shadowFinal; + vec3 sunSpec = GetSpecularBRDF(sunF, NoVm, NoLm, NoHm, roughL) * skyLightColorFinal * skyLight2 * shadowFinal * final.a; specular += sunSpec;// * material.albedo.a; @@ -565,7 +566,7 @@ fogFactor = ApplyFog(final.rgb, viewPos, lightData); #elif defined RENDER_GBUFFER #if defined RENDER_WATER || defined RENDER_HAND_WATER - fogFactor = ApplyFog(final, viewPos, lightData, EPSILON); + fogFactor = ApplyFog(final, viewPos, lightData, 1.0/255.0); #else fogFactor = ApplyFog(final, viewPos, lightData, alphaTestRef); #endif diff --git a/shaders/lib/material/default.glsl b/shaders/lib/material/default.glsl index 9551ca2c..25650631 100644 --- a/shaders/lib/material/default.glsl +++ b/shaders/lib/material/default.glsl @@ -6,7 +6,7 @@ void ApplyHardCodedMaterials() { if (mc_Entity.x == 100.0 || mc_Entity.x == 101.0) { // Water - matSmooth = 0.96; + matSmooth = 0.98; matF0 = 0.02; } else if (mc_Entity.x == 102.0) { @@ -16,7 +16,7 @@ void ApplyHardCodedMaterials() { else if (mc_Entity.x >= 10001.0 && mc_Entity.x <= 10004.0) { // Foliage matSmooth = 0.08; - matSSS = 0.85; + matSSS = 0.7; matF0 = 0.03; } else if (mc_Entity.x >= 11000.0 && mc_Entity.x < 11010) { @@ -43,7 +43,7 @@ void ApplyHardCodedMaterials() { // Snow matSmooth = 0.4; matF0 = 0.02; - matSSS = 0.5; + matSSS = 0.6; } else if (mc_Entity.x == 11011) { // Slime diff --git a/shaders/program/composite5.vsh b/shaders/program/composite5.vsh index c8e87e55..ca90afb3 100644 --- a/shaders/program/composite5.vsh +++ b/shaders/program/composite5.vsh @@ -41,7 +41,7 @@ out vec2 texcoord; blockLightBrightness = pow3(blockLightBrightness) * BlockLightLux; - return 4.0 + 0.05 * max(blockLightBrightness, skyLightBrightness); + return 0.04 * (MinWorldLux + max(blockLightBrightness, skyLightBrightness)); } #endif diff --git a/shaders/shaders.properties b/shaders/shaders.properties index d3fb7c2e..20b0dc1c 100644 --- a/shaders/shaders.properties +++ b/shaders/shaders.properties @@ -4,7 +4,7 @@ profile.POTATO=CAMERA_EXPOSURE_MODE:1 ATMOSPHERE_TYPE:0 REFLECTION_MODE:1 SSR_QU AO_ENABLED !SSAO_ENABLED !SSS_SCATTER SSS_PCF_SAMPLES:12 !PARALLAX_ENABLED !BLOOM_ENABLED !BLOOM_SMOOTH \ !VL_ENABLED VL_SAMPLE_COUNT:15 VL_DITHER !VL_PARTICLES -profile.LOW=CAMERA_EXPOSURE_MODE:1 ATMOSPHERE_TYPE:0 REFLECTION_MODE:2 SSR_QUALITY:0 WATER_FANCY WATER_REFRACTION:0 \ +profile.LOW=CAMERA_EXPOSURE_MODE:1 ATMOSPHERE_TYPE:0 REFLECTION_MODE:2 SSR_QUALITY:0 WATER_FANCY WATER_REFRACTION:1 \ SHADOW_TYPE:2 SHADOW_FILTER:0 shadowMapResolution:2048 shadowDistance:50 !SHADOW_EXCLUDE_ENTITIES !SHADOW_EXCLUDE_FOLIAGE SHADOW_PCF_SAMPLES:12 \ !RSM_ENABLED RSM_SCALE:2 RSM_SAMPLE_COUNT:35 RSM_FILTER_SIZE:0.8 RSM_INTENSITY:4 RSM_UPSCALE \ AO_ENABLED !SSAO_ENABLED !SSS_SCATTER SSS_PCF_SAMPLES:12 PARALLAX_ENABLED BLOOM_ENABLED !BLOOM_SMOOTH \