Revert "intial changes for commit #495"

This reverts commit 4869877f77.
This commit is contained in:
MikiP98
2024-11-16 21:39:26 +01:00
parent 51d696ea5f
commit 62be2ab097
56 changed files with 2279 additions and 3555 deletions

View File

@ -62,25 +62,17 @@ uniform vec2 texelSize;
uniform ivec2 eyeBrightnessSmooth;
uniform float rainStrength;
uniform float nightVision;
flat varying float HELD_ITEM_BRIGHTNESS;
#ifndef OVERWORLD_SHADER
uniform float nightVision;
#endif
#include "/lib/util.glsl"
#ifdef OVERWORLD_SHADER
#ifdef Daily_Weather
flat varying vec4 dailyWeatherParams0;
flat varying vec4 dailyWeatherParams1;
#else
vec4 dailyWeatherParams0 = vec4(CloudLayer0_coverage, CloudLayer1_coverage, CloudLayer2_coverage, 0.0);
vec4 dailyWeatherParams1 = vec4(CloudLayer0_density, CloudLayer1_density, CloudLayer2_density, 0.0);
#endif
#define CLOUDSHADOWSONLY
#define CLOUDSHADOWSONLY
#include "/lib/volumetricClouds.glsl"
#endif
@ -231,8 +223,8 @@ vec3 toClipSpace3(vec3 viewSpacePosition) {
}
flat varying vec3 WsunVec2;
const float mincoord = 1.0/4096.0;
const float maxcoord = 1.0-mincoord;
const float mincoord = 1.0/4096.0;
const float maxcoord = 1.0-mincoord;
uniform sampler2D normals;
varying vec4 tangent;
@ -381,12 +373,7 @@ void main() {
#else
vec3 playerCamPos = cameraPosition;
#endif
// lightmap.x = max(lightmap.x, HELD_ITEM_BRIGHTNESS * clamp( pow(max(1.0-length((feetPlayerPos+cameraPosition) - playerCamPos)/HANDHELD_LIGHT_RANGE,0.0),1.5),0.0,1.0));
if(HELD_ITEM_BRIGHTNESS > 0.0){
float pointLight = clamp(1.0-length((feetPlayerPos+cameraPosition)-playerCamPos)/HANDHELD_LIGHT_RANGE,0.0,1.0);
lightmap.x = mix(lightmap.x, HELD_ITEM_BRIGHTNESS, pointLight*pointLight);
}
lightmap.x = max(lightmap.x, HELD_ITEM_BRIGHTNESS * clamp( pow(max(1.0-length((feetPlayerPos+cameraPosition) - playerCamPos)/HANDHELD_LIGHT_RANGE,0.0),1.5),0.0,1.0));
#endif
#ifdef WEATHER
@ -415,7 +402,7 @@ void main() {
if(lightmap.x >= 0.9) Torch_Color *= LIT_PARTICLE_BRIGHTNESS;
#ifdef OVERWORLD_SHADER
directLightColor = lightCol.rgb/2400.0;
directLightColor = lightCol.rgb/80.0;
float Shadows = 1.0;
vec3 shadowPlayerPos = mat3(gbufferModelViewInverse) * viewPos + gbufferModelViewInverse[3].xyz;
@ -430,7 +417,7 @@ void main() {
Shadows = mix(LM_shadowMapFallback, Shadows, shadowMapFalloff2);
#ifdef CLOUDS_SHADOWS
Shadows *= GetCloudShadow(feetPlayerPos+cameraPosition, WsunVec);
Shadows *= GetCloudShadow(feetPlayerPos);
#endif
Direct_lighting = directLightColor * Shadows;
@ -439,7 +426,7 @@ void main() {
Direct_lighting *= phaseg(clamp(dot(feetPlayerPos_normalized, WsunVec),0.0,1.0), 0.65)*2 + 0.5;
#endif
AmbientLightColor = averageSkyCol_Clouds / 900.0;
AmbientLightColor = averageSkyCol_Clouds / 30.0;
#ifdef IS_IRIS
AmbientLightColor *= 2.5;
@ -451,11 +438,11 @@ void main() {
#endif
#ifdef NETHER_SHADER
Indirect_lighting = volumetricsFromTex(vec3(0.0,1.0,0.0), colortex4, 6).rgb / 1200.0;
Indirect_lighting = skyCloudsFromTexLOD2(vec3(0.0,1.0,0.0), colortex4, 6).rgb / 30.0;
#endif
#ifdef END_SHADER
Indirect_lighting = vec3(0.3,0.6,1.0) * 0.1;
Indirect_lighting = vec3(0.3,0.6,1.0) * 0.5;
#endif
///////////////////////// BLOCKLIGHT LIGHTING OR LPV LIGHTING OR FLOODFILL COLORED LIGHTING