mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-26 18:22:33 +08:00
adjust minimum light values and remove arbitrary modifications to minimum light
This commit is contained in:
@ -332,7 +332,6 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
// diffuse
|
||||
vec3 Indirect_lighting = vec3(0.0);
|
||||
// vec3 MinimumLightColor = vec3(1.0);
|
||||
// if(isEyeInWater == 1) MinimumLightColor = vec3(10.0);
|
||||
vec3 Direct_lighting = vec3(0.0);
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
|
@ -374,7 +374,7 @@ void main() {
|
||||
#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);
|
||||
float pointLight = clamp(1.0-(length((feetPlayerPos+cameraPosition)-playerCamPos)-1.0)/HANDHELD_LIGHT_RANGE,0.0,1.0);
|
||||
lightmap.x = mix(lightmap.x, HELD_ITEM_BRIGHTNESS, pointLight*pointLight);
|
||||
}
|
||||
|
||||
@ -402,7 +402,6 @@ void main() {
|
||||
vec3 Torch_Color = vec3(TORCH_R,TORCH_G,TORCH_B);
|
||||
vec3 MinimumLightColor = vec3(1.0);
|
||||
|
||||
if(isEyeInWater == 1) MinimumLightColor = vec3(10.0);
|
||||
if(lightmap.x >= 0.9) Torch_Color *= LIT_PARTICLE_BRIGHTNESS;
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
|
@ -372,7 +372,7 @@ void main() {
|
||||
}
|
||||
|
||||
#ifdef HAND
|
||||
// torchlightmap *= 0.9;
|
||||
torchlightmap *= 0.9;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -561,7 +561,6 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
|
||||
vec3 Indirect_lighting = vec3(0.0);
|
||||
vec3 MinimumLightColor = vec3(1.0);
|
||||
if(isEyeInWater == 1) MinimumLightColor = vec3(10.0);
|
||||
|
||||
vec3 Direct_lighting = vec3(0.0);
|
||||
|
||||
|
@ -336,10 +336,7 @@ vec4 waterVolumetrics(vec3 rayStart, vec3 rayEnd, float rayLength, vec2 dither,
|
||||
|
||||
|
||||
float bubble = exp2(-10.0 * clamp(1.0 - length(d*dVWorld) / 16.0, 0.0,1.0));
|
||||
// float caustics = mix(max(max(waterCaustics(progressW, WsunVec), phase*0.5) * mix(0.5, 200.0, bubble), phase), 1.0, lowlightlevel);
|
||||
// float caustics = max(max(waterCaustics(progressW, WsunVec), phase*0.5) * mix(0.5, 200.0, bubble), phase);
|
||||
float caustics = max(max(waterCaustics(progressW, WsunVec), phase*0.5) * mix(0.5, 1.5, bubble), phase) ;//* abs(WsunVec.y);
|
||||
|
||||
float caustics = max(max(waterCaustics(progressW, WsunVec), phase*0.5) * mix(0.5, 1.5, bubble), phase);
|
||||
|
||||
vec3 sunAbsorbance = exp(-waterCoefs * (distanceFromWaterSurface/abs(WsunVec.y)));
|
||||
vec3 WaterAbsorbance = exp(-waterCoefs * (distanceFromWaterSurface + thing));
|
||||
@ -534,8 +531,8 @@ void main() {
|
||||
vec3 directLightColor = lightCol.rgb / 2400.0;
|
||||
vec3 indirectLightColor = averageSkyCol / 1200.0;
|
||||
vec3 indirectLightColor_dynamic = averageSkyCol_Clouds / 1200.0;
|
||||
|
||||
// indirectLightColor_dynamic += MIN_LIGHT_AMOUNT * 0.02 * 0.2 + nightVision*0.02;
|
||||
|
||||
// indirectLightColor_dynamic += (MIN_LIGHT_AMOUNT * 0.01 * 0.2 + nightVision*0.02);
|
||||
|
||||
#if defined OVERWORLD_SHADER
|
||||
// z0 = texture2D(depthtex0, tc + jitter/VL_RENDER_RESOLUTION).x;
|
||||
|
@ -155,9 +155,9 @@ void main() {
|
||||
// averageSkyCol_Clouds = max( normalize(averageSkyCol_Clouds) * min(luma(averageSkyCol_Clouds) * 3.0,2.5) * (1.0-rainStrength*0.7), minimumlight);
|
||||
|
||||
|
||||
vec3 minimumlight = vec3(0.02) * 0.2 * MIN_LIGHT_AMOUNT + nightVision * 0.05;
|
||||
vec3 minimumlight = vec3(1.0) * 0.01 * MIN_LIGHT_AMOUNT + nightVision * 0.05;
|
||||
averageSkyCol_Clouds = max(normalize(averageSkyCol_Clouds + 1e-6) * min(luma(averageSkyCol_Clouds) * 3.0,2.5),0.0);
|
||||
averageSkyCol = max(averageSkyCol * PLANET_GROUND_BRIGHTNESS,0.0) + max(minimumlight, 0.02 * 0.2);
|
||||
averageSkyCol = max(averageSkyCol * PLANET_GROUND_BRIGHTNESS,0.0) + minimumlight;
|
||||
|
||||
////////////////////////////////////////
|
||||
/// --- SUNLIGHT/MOONLIGHT STUFF --- ///
|
||||
|
@ -162,7 +162,7 @@ vec4 screenSpaceReflections(
|
||||
vec4 reflection = vec4(0.0);
|
||||
|
||||
float reflectionLength = 0.0;
|
||||
float quality = 30.0f;//mix(10.0f, 30.0f, fresnel);
|
||||
float quality = mix(10.0f, 30.0f, fresnel);
|
||||
|
||||
vec3 raytracePos = rayTraceSpeculars(reflectedVector, viewPos, noise, quality, isHand, reflectionLength, fresnel);
|
||||
|
||||
|
Reference in New Issue
Block a user