Tweak Photonics GI

This commit is contained in:
Merlin1809 committed 2026-02-10 19:31:34 +01:00
1 parent 40b938aaf4
commit a4c27c714f
4 files changed
+23 -17

No files matched your search

+14 -9
View File
@@ -1260,6 +1260,7 @@ void main() {
// idk why this do
// this seems to be compensating view bobbing, but why not do this when calculating feetPlayerPos? hmmm
feetPlayerPos += gbufferModelViewInverse[3].xyz;
float viewDist = length(feetPlayerPos);
worldPos = feetPlayerPos + cameraPosition;
////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////// FILTER STUFF //////////////////////////////////
@@ -1292,11 +1293,11 @@ void main() {
//////////////////////////////// SHADOWMAP ////////////////////////////////
// setup shadow projection
float shadowMapFalloff = smoothstep(0.0, 1.0, min(max(1.0 - length(feetPlayerPos) / (shadowDistance+32.0),0.0)*5.0,1.0));
float shadowMapFalloff = smoothstep(0.0, 1.0, min(max(1.0 - viewDist / (shadowDistance+32.0),0.0)*5.0,1.0));
#if defined DISTANT_HORIZONS || defined VOXY
float shadowMapFalloff2 = smoothstep(0.0, 1.0, min(max(1.0 - length(feetPlayerPos) / min(shadowDistance, max(far-32.0,32.0)),0.0)*5.0,1.0));
float shadowMapFalloff2 = smoothstep(0.0, 1.0, min(max(1.0 - viewDist / min(shadowDistance, max(far-32.0,32.0)),0.0)*5.0,1.0));
#else
float shadowMapFalloff2 = smoothstep(0.0, 1.0, min(max(1.0 - length(feetPlayerPos) / shadowDistance,0.0)*5.0,1.0));
float shadowMapFalloff2 = smoothstep(0.0, 1.0, min(max(1.0 - viewDist / shadowDistance,0.0)*5.0,1.0));
#endif
if(eyeInWater){
@@ -1476,6 +1477,16 @@ void main() {
Indirect_lighting += doIndirectLighting(AmbientLightColor * skylight, MinimumLightColor, lightmap.y);
#ifdef PHOTONICS_ENABLED
#if defined DISTANT_HORIZONS || defined VOXY
float photonicsFalloff = smoothstep(min(far, 128.0), min(0.9*far, 118.0), viewDist);
#else
float photonicsFalloff = smoothstep(256.0, 230.0, viewDist);
#endif
vec3 gi_color = texture(colortex15, texcoord).xyz;
Indirect_lighting = mix(Indirect_lighting, gi_color*2.5*PHOTONICS_INDIRECT_BRIGHTNESS, photonicsFalloff);
#endif
#endif
#ifdef NETHER_SHADER
@@ -1537,12 +1548,6 @@ void main() {
///////////////////////////// EFFECTS FOR INDIRECT /////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
#ifdef PHOTONICS_ENABLED
vec3 gi_color = texture(colortex15, texcoord).xyz;
Indirect_lighting += gi_color*2.5*PHOTONICS_INDIRECT_BRIGHTNESS;
#endif
float SkySSS = SSAO_SSS.y;
vec3 AO = vec3(1.0);
+1 -1
View File
@@ -1,6 +1,6 @@
option.SHADER_VERSION_LABEL = §d§lECLIPSE§r - A Bliss Edit
prefix.SHADER_VERSION_LABEL = V
value.SHADER_VERSION_LABEL.482 = 6.3.1
value.SHADER_VERSION_LABEL.482 = 6.3.2
# if you're here to translate, this is not a joke, these do what they say
profile.POTATO=§4Potato
+1 -1
View File
@@ -1,6 +1,6 @@
option.SHADER_VERSION_LABEL = §d§lECLIPSE§r - Bliss 编辑版
prefix.SHADER_VERSION_LABEL = 版本
value.SHADER_VERSION_LABEL.482 = 6.3.1
value.SHADER_VERSION_LABEL.482 = 6.3.2
# 如果你是来翻译的,这不是玩笑,这些选项的功能正如其名
profile.POTATO=§4土豆 (极低配置)
+7 -6
View File
@@ -183,13 +183,14 @@ vec3 doBlockLightLighting(
photonicsLight += (ph_direct_soft.xyz / max(ph_direct_soft.w, 1.0f));
photonicsLight += lightColor * 2.5 * min(max(lightmap-0.999,0.0)/(1.0-0.999),1.0);
#if defined DISTANT_HORIZONS || defined VOXY
float photonicsFalloff = smoothstep(min(1.0*far, 256.0), min(0.9*far, 230.0), length(playerPos));
blockLight = mix(blockLight, photonicsLight, photonicsFalloff);
#else
blockLight = photonicsLight;
#endif
float photonicsFalloff = smoothstep(min(far, 256.0), min(0.9*far, 230.0), length(playerPos));
#else
float photonicsFalloff = smoothstep(256.0, 230.0, length(playerPos));
#endif
blockLight = mix(blockLight, photonicsLight, photonicsFalloff);
}
#endif