mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-20 16:07:22 +08:00
LIGHTNIGN, FLASHES TOO.. max cloudy fog height,
This commit is contained in:
parent
90c92973b7
commit
84a3d8148e
@ -737,6 +737,7 @@ vec3 Moon(vec3 PlayerPos, vec3 WorldSunVec, vec3 Color, inout vec3 occludeStars)
|
|||||||
|
|
||||||
#include "lib/PhotonGTAO.glsl"
|
#include "lib/PhotonGTAO.glsl"
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////VOID MAIN//////////////////////////////
|
//////////////////////////////VOID MAIN//////////////////////////////
|
||||||
//////////////////////////////VOID MAIN//////////////////////////////
|
//////////////////////////////VOID MAIN//////////////////////////////
|
||||||
//////////////////////////////VOID MAIN//////////////////////////////
|
//////////////////////////////VOID MAIN//////////////////////////////
|
||||||
@ -818,7 +819,9 @@ void main() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool translucent = abs(dataUnpacked1.w-0.5) <0.01; // Strong translucency
|
|
||||||
|
bool lightningBolt = abs(dataUnpacked1.w-0.5) <0.01;
|
||||||
|
|
||||||
bool translucent2 = abs(dataUnpacked1.w-0.6) <0.01; // Weak translucency
|
bool translucent2 = abs(dataUnpacked1.w-0.6) <0.01; // Weak translucency
|
||||||
bool translucent3 = abs(dataUnpacked1.w-0.55) <0.01; // all blocks
|
bool translucent3 = abs(dataUnpacked1.w-0.55) <0.01; // all blocks
|
||||||
bool translucent4 = abs(dataUnpacked1.w-0.65) <0.01; // Weak translucency
|
bool translucent4 = abs(dataUnpacked1.w-0.65) <0.01; // Weak translucency
|
||||||
@ -995,6 +998,7 @@ void main() {
|
|||||||
Indirect_lighting = DoAmbientLighting(AmbientLightColor, vec3(TORCH_R,TORCH_G,TORCH_B), newLightmap.xy, skylight);
|
Indirect_lighting = DoAmbientLighting(AmbientLightColor, vec3(TORCH_R,TORCH_G,TORCH_B), newLightmap.xy, skylight);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
vec3 AO = vec3(1.0);
|
vec3 AO = vec3(1.0);
|
||||||
vec3 debug = vec3(0.0);
|
vec3 debug = vec3(0.0);
|
||||||
|
|
||||||
@ -1121,6 +1125,8 @@ void main() {
|
|||||||
//combine all light sources
|
//combine all light sources
|
||||||
vec3 FINAL_COLOR = Indirect_lighting + Direct_lighting;
|
vec3 FINAL_COLOR = Indirect_lighting + Direct_lighting;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef Variable_Penumbra_Shadows
|
#ifdef Variable_Penumbra_Shadows
|
||||||
FINAL_COLOR += SSS*DirectLightColor * lightleakfix;
|
FINAL_COLOR += SSS*DirectLightColor * lightleakfix;
|
||||||
#endif
|
#endif
|
||||||
@ -1136,6 +1142,8 @@ void main() {
|
|||||||
LabEmission(FINAL_COLOR, albedo, SpecularTex.a);
|
LabEmission(FINAL_COLOR, albedo, SpecularTex.a);
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
if(lightningBolt) FINAL_COLOR.rgb += vec3(0.5,0.8,1.0) * 255.0;
|
||||||
|
|
||||||
gl_FragData[0].rgb = FINAL_COLOR;
|
gl_FragData[0].rgb = FINAL_COLOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1161,7 +1169,6 @@ void main() {
|
|||||||
|
|
||||||
|
|
||||||
// gl_FragData[0].rgb *= GetCloudSkyOcclusion(p3 + cameraPosition);
|
// gl_FragData[0].rgb *= GetCloudSkyOcclusion(p3 + cameraPosition);
|
||||||
// if (abs(filtered.b-0.1) < 0.0004 ) gl_FragData[0].rgb = vec3(0,1,0);
|
|
||||||
|
|
||||||
/* DRAWBUFFERS:3 */
|
/* DRAWBUFFERS:3 */
|
||||||
}
|
}
|
@ -118,9 +118,11 @@ float waterCaustics(vec3 wPos, vec3 lightSource) { // water waves
|
|||||||
return caustic / weightSum;
|
return caustic / weightSum;
|
||||||
}
|
}
|
||||||
|
|
||||||
vec3 normVec (vec3 vec){
|
// vec3 normVec (vec3 vec){
|
||||||
return vec*inversesqrt(dot(vec,vec));
|
// return vec*inversesqrt(dot(vec,vec));
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
#include "lib/volumetricFog.glsl"
|
||||||
|
|
||||||
void waterVolumetrics(inout vec3 inColor, vec3 rayStart, vec3 rayEnd, float estEyeDepth, float estSunDepth, float rayLength, float dither, vec3 waterCoefs, vec3 scatterCoef, vec3 ambient, vec3 lightSource, float VdotL){
|
void waterVolumetrics(inout vec3 inColor, vec3 rayStart, vec3 rayEnd, float estEyeDepth, float estSunDepth, float rayLength, float dither, vec3 waterCoefs, vec3 scatterCoef, vec3 ambient, vec3 lightSource, float VdotL){
|
||||||
int spCount = 8;
|
int spCount = 8;
|
||||||
@ -195,7 +197,6 @@ void waterVolumetrics(inout vec3 inColor, vec3 rayStart, vec3 rayEnd, float estE
|
|||||||
inColor += vL;
|
inColor += vL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "lib/volumetricFog.glsl"
|
|
||||||
|
|
||||||
//////////////////////////////VOID MAIN//////////////////////////////
|
//////////////////////////////VOID MAIN//////////////////////////////
|
||||||
//////////////////////////////VOID MAIN//////////////////////////////
|
//////////////////////////////VOID MAIN//////////////////////////////
|
||||||
|
@ -272,7 +272,7 @@ void main() {
|
|||||||
if (isEyeInWater == 1){
|
if (isEyeInWater == 1){
|
||||||
float fogfade = clamp( exp(length(p3) / -10) ,0.0,1.0);
|
float fogfade = clamp( exp(length(p3) / -10) ,0.0,1.0);
|
||||||
color.rgb = color.rgb * fogfade ;
|
color.rgb = color.rgb * fogfade ;
|
||||||
vl.a *= fogfade*0.7+0.3 ;
|
vl.a *= fogfade ;
|
||||||
}
|
}
|
||||||
|
|
||||||
color *= vl.a;
|
color *= vl.a;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "lib/settings.glsl"
|
#include "lib/settings.glsl"
|
||||||
//Prepares sky textures (2 * 256 * 256), computes light values and custom lightmaps
|
//Prepares sky textures (2 * 256 * 256), computes light values and custom lightmaps
|
||||||
|
#define ReflectedFog
|
||||||
|
|
||||||
flat varying vec3 ambientUp;
|
flat varying vec3 ambientUp;
|
||||||
flat varying vec3 ambientLeft;
|
flat varying vec3 ambientLeft;
|
||||||
@ -102,6 +103,7 @@ vec3 toScreenSpace(vec3 p) {
|
|||||||
vec4 fragposition = iProjDiag * p3.xyzz + gbufferProjectionInverse[3];
|
vec4 fragposition = iProjDiag * p3.xyzz + gbufferProjectionInverse[3];
|
||||||
return fragposition.xyz / fragposition.w;
|
return fragposition.xyz / fragposition.w;
|
||||||
}
|
}
|
||||||
|
|
||||||
const vec2[8] offsets = vec2[8](vec2(1./8.,-3./8.),
|
const vec2[8] offsets = vec2[8](vec2(1./8.,-3./8.),
|
||||||
vec2(-1.,3.)/8.,
|
vec2(-1.,3.)/8.,
|
||||||
vec2(5.0,1.)/8.,
|
vec2(5.0,1.)/8.,
|
||||||
@ -146,33 +148,35 @@ if (gl_FragCoord.x < 17. && gl_FragCoord.y > 19. && gl_FragCoord.y < 19.+17. ){
|
|||||||
|
|
||||||
//Save light values
|
//Save light values
|
||||||
if (gl_FragCoord.x < 1. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
if (gl_FragCoord.x < 1. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
||||||
gl_FragData[0] = vec4(ambientUp * blackbody(ambient_temp),1.0);
|
gl_FragData[0] = vec4(ambientUp * blackbody(ambient_temp) ,1.0);
|
||||||
if (gl_FragCoord.x > 1. && gl_FragCoord.x < 2. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
if (gl_FragCoord.x > 1. && gl_FragCoord.x < 2. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
||||||
gl_FragData[0] = vec4(ambientUp,1.0);
|
gl_FragData[0] = vec4(ambientUp ,1.0);
|
||||||
if (gl_FragCoord.x > 2. && gl_FragCoord.x < 3. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
if (gl_FragCoord.x > 2. && gl_FragCoord.x < 3. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
||||||
gl_FragData[0] = vec4(ambientLeft,1.0);
|
gl_FragData[0] = vec4(ambientLeft ,1.0);
|
||||||
if (gl_FragCoord.x > 3. && gl_FragCoord.x < 4. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
if (gl_FragCoord.x > 3. && gl_FragCoord.x < 4. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
||||||
gl_FragData[0] = vec4(ambientRight,1.0);
|
gl_FragData[0] = vec4(ambientRight ,1.0);
|
||||||
if (gl_FragCoord.x > 4. && gl_FragCoord.x < 5. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
if (gl_FragCoord.x > 4. && gl_FragCoord.x < 5. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
||||||
gl_FragData[0] = vec4(ambientB,1.0);
|
gl_FragData[0] = vec4(ambientB ,1.0);
|
||||||
if (gl_FragCoord.x > 5. && gl_FragCoord.x < 6. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
if (gl_FragCoord.x > 5. && gl_FragCoord.x < 6. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
||||||
gl_FragData[0] = vec4(ambientF,1.0);
|
gl_FragData[0] = vec4(ambientF ,1.0);
|
||||||
if (gl_FragCoord.x > 6. && gl_FragCoord.x < 7. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
if (gl_FragCoord.x > 6. && gl_FragCoord.x < 7. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
||||||
gl_FragData[0] = vec4(lightSourceColor,1.0);
|
gl_FragData[0] = vec4(lightSourceColor,1.0);
|
||||||
if (gl_FragCoord.x > 7. && gl_FragCoord.x < 8. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
if (gl_FragCoord.x > 7. && gl_FragCoord.x < 8. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
||||||
gl_FragData[0] = vec4(avgAmbient,1.0);
|
gl_FragData[0] = vec4(avgAmbient ,1.0);
|
||||||
if (gl_FragCoord.x > 8. && gl_FragCoord.x < 9. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
if (gl_FragCoord.x > 8. && gl_FragCoord.x < 9. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
||||||
gl_FragData[0] = vec4(sunColor,1.0);
|
gl_FragData[0] = vec4(sunColor,1.0);
|
||||||
if (gl_FragCoord.x > 9. && gl_FragCoord.x < 10. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
if (gl_FragCoord.x > 9. && gl_FragCoord.x < 10. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
||||||
gl_FragData[0] = vec4(moonColor,1.0);
|
gl_FragData[0] = vec4(moonColor,1.0);
|
||||||
if (gl_FragCoord.x > 11. && gl_FragCoord.x < 12. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
if (gl_FragCoord.x > 11. && gl_FragCoord.x < 12. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
||||||
gl_FragData[0] = vec4(avgSky,1.0);
|
gl_FragData[0] = vec4(avgSky ,1.0);
|
||||||
if (gl_FragCoord.x > 12. && gl_FragCoord.x < 13. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
if (gl_FragCoord.x > 12. && gl_FragCoord.x < 13. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
||||||
gl_FragData[0] = vec4(sunColorCloud,1.0);
|
gl_FragData[0] = vec4(sunColorCloud,1.0);
|
||||||
if (gl_FragCoord.x > 13. && gl_FragCoord.x < 14. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
if (gl_FragCoord.x > 13. && gl_FragCoord.x < 14. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
||||||
gl_FragData[0] = vec4(moonColorCloud,1.0);
|
gl_FragData[0] = vec4(moonColorCloud,1.0);
|
||||||
//Sky gradient (no clouds)
|
//Sky gradient (no clouds)
|
||||||
const float pi = 3.141592653589793238462643383279502884197169;
|
const float pi = 3.141592653589793238462643383279502884197169;
|
||||||
|
|
||||||
|
|
||||||
if (gl_FragCoord.x > 18. && gl_FragCoord.y > 1. && gl_FragCoord.x < 18+257){
|
if (gl_FragCoord.x > 18. && gl_FragCoord.y > 1. && gl_FragCoord.x < 18+257){
|
||||||
vec2 p = clamp(floor(gl_FragCoord.xy-vec2(18.,1.))/256.+tempOffsets/256.,0.0,1.0);
|
vec2 p = clamp(floor(gl_FragCoord.xy-vec2(18.,1.))/256.+tempOffsets/256.,0.0,1.0);
|
||||||
vec3 viewVector = cartToSphere(p);
|
vec3 viewVector = cartToSphere(p);
|
||||||
@ -200,11 +204,12 @@ if (gl_FragCoord.x > 18.+257. && gl_FragCoord.y > 1. && gl_FragCoord.x < 18+257+
|
|||||||
vec3 viewVector = cartToSphere(p);
|
vec3 viewVector = cartToSphere(p);
|
||||||
|
|
||||||
vec3 WsunVec = mat3(gbufferModelViewInverse)*sunVec;
|
vec3 WsunVec = mat3(gbufferModelViewInverse)*sunVec;
|
||||||
vec3 skytex = texelFetch2D(colortex4,ivec2(gl_FragCoord.xy)-ivec2(257,0),0).rgb/150.;
|
vec3 skytex = texelFetch2D(colortex4,ivec2(gl_FragCoord.xy)-ivec2(257,0),0).rgb/150. ;
|
||||||
|
|
||||||
if(viewVector.y < -0.025) skytex = skytex * clamp( exp(viewVector.y) - 1.0,0.25,1.0) ;
|
if(viewVector.y < -0.025) skytex = skytex * clamp( exp(viewVector.y) - 1.0,0.25,1.0) ;
|
||||||
|
|
||||||
vec4 clouds = renderClouds(mat3(gbufferModelView)*viewVector*1024.,vec2(fract(frameCounter/1.6180339887),1-fract(frameCounter/1.6180339887)), sunColorCloud, moonColor, ambientUp*5.0);
|
vec4 clouds = renderClouds(mat3(gbufferModelView)*viewVector*1024.,vec2(fract(frameCounter/1.6180339887),1-fract(frameCounter/1.6180339887)), sunColorCloud, moonColor, ambientUp*5.0);
|
||||||
skytex = skytex*clouds.a + clouds.rgb/5.0;
|
// skytex = skytex*clouds.a + clouds.rgb/5.0;
|
||||||
|
|
||||||
vec4 VL_Fog = getVolumetricRays(mat3(gbufferModelView)*viewVector*1024., fract(frameCounter/1.6180339887), ambientUp);
|
vec4 VL_Fog = getVolumetricRays(mat3(gbufferModelView)*viewVector*1024., fract(frameCounter/1.6180339887), ambientUp);
|
||||||
skytex = skytex*VL_Fog.a + VL_Fog.rgb*20;
|
skytex = skytex*VL_Fog.a + VL_Fog.rgb*20;
|
||||||
|
@ -542,6 +542,8 @@ void main() {
|
|||||||
#ifdef WORLD
|
#ifdef WORLD
|
||||||
vec4 Albedo = texture2D(texture, lmtexcoord.xy, bias) * color;
|
vec4 Albedo = texture2D(texture, lmtexcoord.xy, bias) * color;
|
||||||
|
|
||||||
|
if(LIGHTNING > 0) Albedo = vec4(1);
|
||||||
|
|
||||||
#ifdef AEROCHROME_MODE
|
#ifdef AEROCHROME_MODE
|
||||||
vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631), AEROCHROME_PINKNESS);
|
vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631), AEROCHROME_PINKNESS);
|
||||||
float gray = dot(Albedo.rgb, vec3(0.2, 01.0, 0.07));
|
float gray = dot(Albedo.rgb, vec3(0.2, 01.0, 0.07));
|
||||||
@ -599,7 +601,7 @@ void main() {
|
|||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
|
|
||||||
// vec4 data1 = clamp( encode(viewToWorld(normal), (blueNoise()*lmtexcoord.zw/30.0) + lmtexcoord.zw), 0.0, 1.0);
|
// vec4 data1 = clamp( encode(viewToWorld(normal), (blueNoise()*lmtexcoord.zw/30.0) + lmtexcoord.zw), 0.0, 1.0);
|
||||||
vec4 data1 = clamp( encode(viewToWorld(normal), (blueNoise()*vec2(torchlightmap,lmtexcoord.w)/ (30.0 * (1+ (1-RENDER_SCALE.x))) ) + vec2(torchlightmap,lmtexcoord.w)), 0.0, 1.0);
|
vec4 data1 = clamp( encode(viewToWorld(normal), (blueNoise()*vec2(torchlightmap,lmtexcoord.w) / (30.0 * (1+ (1-RENDER_SCALE.x))) ) + vec2(torchlightmap,lmtexcoord.w)), 0.0, 1.0);
|
||||||
|
|
||||||
gl_FragData[0] = vec4(encodeVec2(Albedo.x,data1.x), encodeVec2(Albedo.y,data1.y), encodeVec2(Albedo.z,data1.z), encodeVec2(data1.w,Albedo.w));
|
gl_FragData[0] = vec4(encodeVec2(Albedo.x,data1.x), encodeVec2(Albedo.y,data1.y), encodeVec2(Albedo.z,data1.z), encodeVec2(data1.w,Albedo.w));
|
||||||
|
|
||||||
|
@ -45,15 +45,15 @@ float pi2wt = PI48*frameTimeCounter;
|
|||||||
attribute vec4 mc_Entity;
|
attribute vec4 mc_Entity;
|
||||||
uniform int blockEntityId;
|
uniform int blockEntityId;
|
||||||
uniform int entityId;
|
uniform int entityId;
|
||||||
|
flat varying float blockID;
|
||||||
|
|
||||||
uniform int heldItemId;
|
uniform int heldItemId;
|
||||||
uniform int heldItemId2;
|
uniform int heldItemId2;
|
||||||
flat varying float HELD_ITEM_BRIGHTNESS;
|
flat varying float HELD_ITEM_BRIGHTNESS;
|
||||||
|
|
||||||
flat varying float blockID;
|
|
||||||
|
|
||||||
flat varying int LIGHTNING;
|
flat varying int LIGHTNING;
|
||||||
|
|
||||||
|
|
||||||
flat varying float SSSAMOUNT;
|
flat varying float SSSAMOUNT;
|
||||||
flat varying float EMISSIVE;
|
flat varying float EMISSIVE;
|
||||||
flat varying int NameTags;
|
flat varying int NameTags;
|
||||||
@ -199,8 +199,6 @@ void main() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef MC_NORMAL_MAP
|
#ifdef MC_NORMAL_MAP
|
||||||
tangent = vec4(normalize(gl_NormalMatrix *at_tangent.rgb),at_tangent.w);
|
tangent = vec4(normalize(gl_NormalMatrix *at_tangent.rgb),at_tangent.w);
|
||||||
#endif
|
#endif
|
||||||
@ -235,7 +233,7 @@ PHYSICSMOD_SNOW = 0;
|
|||||||
|
|
||||||
/////// ----- EMISSIVE STUFF ----- ///////
|
/////// ----- EMISSIVE STUFF ----- ///////
|
||||||
EMISSIVE = 0.0;
|
EMISSIVE = 0.0;
|
||||||
|
LIGHTNING = 0;
|
||||||
// if(NameTags > 0) EMISSIVE = 0.9;
|
// if(NameTags > 0) EMISSIVE = 0.9;
|
||||||
|
|
||||||
// normal block lightsources
|
// normal block lightsources
|
||||||
@ -243,7 +241,12 @@ PHYSICSMOD_SNOW = 0;
|
|||||||
|
|
||||||
// special cases light lightning and beacon beams...
|
// special cases light lightning and beacon beams...
|
||||||
#ifdef ENTITIES
|
#ifdef ENTITIES
|
||||||
if(entityId == 12345) EMISSIVE = 0.9;
|
|
||||||
|
if(entityId == 12345){
|
||||||
|
LIGHTNING = 1;
|
||||||
|
normalMat.a = 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/////// ----- SSS STUFF ----- ///////
|
/////// ----- SSS STUFF ----- ///////
|
||||||
|
@ -22,6 +22,10 @@ vec3 DoAmbientLighting (vec3 SkyColor, vec3 TorchColor, vec2 Lightmap, float sky
|
|||||||
// vec3 SkyLight = max(SkyColor * min(pow(Lightmap.y,3.0),1.0), vec3(0.2,0.4,1.0) * (MIN_LIGHT_AMOUNT*0.01)) ;
|
// vec3 SkyLight = max(SkyColor * min(pow(Lightmap.y,3.0),1.0), vec3(0.2,0.4,1.0) * (MIN_LIGHT_AMOUNT*0.01)) ;
|
||||||
|
|
||||||
SkyColor = (SkyColor * 2.0 * ambient_brightness) * 8./150./3.;
|
SkyColor = (SkyColor * 2.0 * ambient_brightness) * 8./150./3.;
|
||||||
|
|
||||||
|
SkyColor += vec3(0.5,0.8,1.0) * 50.0 * skyLightDir * lightningFlash ;
|
||||||
|
// SkyColor += vec3(0.7,0.9,1.0) * skyLightDir * lightningFlash;
|
||||||
|
|
||||||
float skyLM = (pow(Lightmap.y,15.0)*2.0 + pow(Lightmap.y,2.5))*0.5;
|
float skyLM = (pow(Lightmap.y,15.0)*2.0 + pow(Lightmap.y,2.5))*0.5;
|
||||||
vec3 SkyLight = max(SkyColor * skyLM, vec3(0.2,0.4,1.0) * (MIN_LIGHT_AMOUNT*0.01));
|
vec3 SkyLight = max(SkyColor * skyLM, vec3(0.2,0.4,1.0) * (MIN_LIGHT_AMOUNT*0.01));
|
||||||
|
|
||||||
|
@ -200,6 +200,8 @@ float PhaseHG(float cosTheta, float g) {
|
|||||||
return Inv4Pi * (1 - g * g) / (denom * sqrt(denom));
|
return Inv4Pi * (1 - g * g) / (denom * sqrt(denom));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uniform float lightningFlash;
|
||||||
|
|
||||||
vec4 renderClouds(
|
vec4 renderClouds(
|
||||||
vec3 FragPosition,
|
vec3 FragPosition,
|
||||||
vec2 Dither,
|
vec2 Dither,
|
||||||
@ -264,6 +266,8 @@ vec4 renderClouds(
|
|||||||
|
|
||||||
float timing = 1.0 - clamp(pow(abs(dV_Sun.y)/150.0,2.0),0.0,1.0);
|
float timing = 1.0 - clamp(pow(abs(dV_Sun.y)/150.0,2.0),0.0,1.0);
|
||||||
|
|
||||||
|
vec3 lightningColor = vec3(0.5,0.8,1.0) * 1000.0 * lightningFlash;
|
||||||
|
|
||||||
#ifdef Cumulus
|
#ifdef Cumulus
|
||||||
for(int i=0;i<maxIT_clouds;i++) {
|
for(int i=0;i<maxIT_clouds;i++) {
|
||||||
distancething *= 2;
|
distancething *= 2;
|
||||||
@ -302,6 +306,7 @@ vec4 renderClouds(
|
|||||||
float ambientlightshadow = 1.0 - clamp(exp((progress_view.y - (MaxCumulusHeight - 50)) / 100.0),0.0,1.0) ;
|
float ambientlightshadow = 1.0 - clamp(exp((progress_view.y - (MaxCumulusHeight - 50)) / 100.0),0.0,1.0) ;
|
||||||
|
|
||||||
vec3 S = Cloud_lighting(muE, cumulus*Cumulus_density, Sunlight, MoonLight, SkyColor, sunContribution, sunContributionMulti, moonContribution, ambientlightshadow, 0, progress_view, timing);
|
vec3 S = Cloud_lighting(muE, cumulus*Cumulus_density, Sunlight, MoonLight, SkyColor, sunContribution, sunContributionMulti, moonContribution, ambientlightshadow, 0, progress_view, timing);
|
||||||
|
S += lightningColor * exp((1.0-cumulus) * -10) * ambientlightshadow;
|
||||||
|
|
||||||
vec3 Sint = (S - S * exp(-mult*muE)) / muE;
|
vec3 Sint = (S - S * exp(-mult*muE)) / muE;
|
||||||
color += max(muE*Sint*total_extinction,0.0);
|
color += max(muE*Sint*total_extinction,0.0);
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
|
||||||
|
vec3 normVec (vec3 vec){
|
||||||
|
return vec*inversesqrt(dot(vec,vec));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
float phaseRayleigh(float cosTheta) {
|
float phaseRayleigh(float cosTheta) {
|
||||||
const vec2 mul_add = vec2(0.1, 0.28) /acos(-1.0);
|
const vec2 mul_add = vec2(0.1, 0.28) /acos(-1.0);
|
||||||
return cosTheta * mul_add.x + mul_add.y; // optimized version from [Elek09], divided by 4 pi for energy conservation
|
return cosTheta * mul_add.x + mul_add.y; // optimized version from [Elek09], divided by 4 pi for energy conservation
|
||||||
@ -30,7 +36,8 @@ float cloudVol(in vec3 pos){
|
|||||||
|
|
||||||
// float CloudyFog = max( (fog_shape*2.0 - fog_eroded*0.5) - 1.2, max(fog_shape-0.8,0.0)) * mult;
|
// float CloudyFog = max( (fog_shape*2.0 - fog_eroded*0.5) - 1.2, max(fog_shape-0.8,0.0)) * mult;
|
||||||
|
|
||||||
float CloudyFog = max((fog_shape*1.2 - fog_eroded*0.2) - 0.75,0.0) ;
|
float heightlimit = exp2( -max((pos.y - SEA_LEVEL) / 25.,0.0));
|
||||||
|
float CloudyFog = max((fog_shape*1.2 - fog_eroded*0.2) - 0.75,0.0) * heightlimit ;
|
||||||
|
|
||||||
float UniformFog = exp2( -max((pos.y - SEA_LEVEL) / 25.,0.0));
|
float UniformFog = exp2( -max((pos.y - SEA_LEVEL) / 25.,0.0));
|
||||||
|
|
||||||
@ -77,9 +84,20 @@ vec4 getVolumetricRays(
|
|||||||
float mie = phaseg(SdotV,0.7)*5.0 + 1.0;
|
float mie = phaseg(SdotV,0.7)*5.0 + 1.0;
|
||||||
float rayL = phaseRayleigh(SdotV);
|
float rayL = phaseRayleigh(SdotV);
|
||||||
|
|
||||||
|
|
||||||
// Makes fog more white idk how to simulate it correctly
|
// Makes fog more white idk how to simulate it correctly
|
||||||
vec3 sunColor = lightCol.rgb / 80.0;
|
vec3 sunColor = lightCol.rgb / 80.0;
|
||||||
vec3 skyCol0 = AmbientColor / 150. * 5.; // * max(abs(WsunVec.y)/150.0,0.);
|
vec3 skyCol0 = AmbientColor / 150. * 5. ; // * max(abs(WsunVec.y)/150.0,0.);
|
||||||
|
|
||||||
|
vec3 lightningColor = vec3(0.5,0.8,1.0) * 25.0 * lightningFlash;
|
||||||
|
#ifdef ReflectedFog
|
||||||
|
lightningColor *= 0.01;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
vec3 np3 = normVec(wpos);
|
||||||
|
float ambfogfade = clamp(exp(np3.y*1.5 - 1.5),0.0,1.0) * 2 ;
|
||||||
|
skyCol0 += lightningColor * ambfogfade;
|
||||||
|
|
||||||
|
|
||||||
#ifdef Biome_specific_environment
|
#ifdef Biome_specific_environment
|
||||||
// recolor change sun and sky color to some color, but make sure luminance is preserved.
|
// recolor change sun and sky color to some color, but make sure luminance is preserved.
|
||||||
@ -149,7 +167,6 @@ vec4 getVolumetricRays(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// really dumb lmao
|
/// really dumb lmao
|
||||||
vec4 InsideACloudFog(
|
vec4 InsideACloudFog(
|
||||||
vec3 fragpos,
|
vec3 fragpos,
|
||||||
@ -200,9 +217,19 @@ vec4 InsideACloudFog(
|
|||||||
|
|
||||||
if(dV_Sun.y/shadowStep < -0.1) dV_Sun = -dV_Sun;
|
if(dV_Sun.y/shadowStep < -0.1) dV_Sun = -dV_Sun;
|
||||||
|
|
||||||
|
|
||||||
vec3 Fog_SkyCol = SkyColor;
|
vec3 Fog_SkyCol = SkyColor;
|
||||||
vec3 Fog_SunCol = SunColor;
|
vec3 Fog_SunCol = SunColor;
|
||||||
|
|
||||||
|
vec3 lightningColor = vec3(0.5,0.8,1.0) * 255.0 * lightningFlash;
|
||||||
|
#ifdef ReflectedFog
|
||||||
|
lightningColor *= 0.01;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
vec3 np3 = normVec(wpos);
|
||||||
|
float ambfogfade = clamp(exp(np3.y*1.5 - 1.5),0.0,1.0) * 2 ;
|
||||||
|
|
||||||
|
Fog_SkyCol += (lightningColor/10) * ambfogfade;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -322,6 +349,8 @@ vec4 InsideACloudFog(
|
|||||||
float ambientlightshadow = 1.0 - clamp(exp((progress_view.y - (MaxCumulusHeight - 50)) / 100.0),0.0,1.0) ;
|
float ambientlightshadow = 1.0 - clamp(exp((progress_view.y - (MaxCumulusHeight - 50)) / 100.0),0.0,1.0) ;
|
||||||
vec3 S = Cloud_lighting(muE, cumulus*Cumulus_density, Sunlight, MoonLight, SkyColor, sunContribution, sunContributionMulti, moonContribution, ambientlightshadow, 0, progress_view, timing);
|
vec3 S = Cloud_lighting(muE, cumulus*Cumulus_density, Sunlight, MoonLight, SkyColor, sunContribution, sunContributionMulti, moonContribution, ambientlightshadow, 0, progress_view, timing);
|
||||||
|
|
||||||
|
S += lightningColor * exp((1.0-cumulus) * -5) * ambientlightshadow;
|
||||||
|
|
||||||
vec3 Sint = (S - S * exp(-mult*muE)) / muE;
|
vec3 Sint = (S - S * exp(-mult*muE)) / muE;
|
||||||
color += max(muE*Sint*total_extinction,0.0);
|
color += max(muE*Sint*total_extinction,0.0);
|
||||||
total_extinction *= max(exp(-mult*muE),0.0);
|
total_extinction *= max(exp(-mult*muE),0.0);
|
||||||
|
@ -57,7 +57,7 @@ screen = [Direct_Light] [World] [Ambient_light] [Fog] [Post_Processing] [Clouds]
|
|||||||
screen.Direct_Light = [Shadows] [Subsurface_Scattering] [Sun_and_Moon_Colors] sunPathRotation sun_illuminance moon_illuminance
|
screen.Direct_Light = [Shadows] [Subsurface_Scattering] [Sun_and_Moon_Colors] sunPathRotation sun_illuminance moon_illuminance
|
||||||
|
|
||||||
screen.Shadows.columns=1
|
screen.Shadows.columns=1
|
||||||
screen.Shadows = SCREENSPACE_CONTACT_SHADOWS Stochastic_Transparent_Shadows SHADOW_FRUSTRUM_CULLING CAVE_LIGHT_LEAK_FIX <skip> [Filtering] shadowMapResolution shadowDistance shadowDistanceRenderMul
|
screen.Shadows = SCREENSPACE_CONTACT_SHADOWS Stochastic_Transparent_Shadows SHADOW_FRUSTRUM_CULLING CAVE_LIGHT_LEAK_FIX <empty> [Filtering] shadowMapResolution shadowDistance shadowDistanceRenderMul
|
||||||
|
|
||||||
screen.Subsurface_Scattering.columns=1
|
screen.Subsurface_Scattering.columns=1
|
||||||
screen.Subsurface_Scattering = Variable_Penumbra_Shadows Ambient_SSS <empty> SSS_TYPE LabSSS_Curve <empty> mob_SSS misc_block_SSS ambientsss_brightness
|
screen.Subsurface_Scattering = Variable_Penumbra_Shadows Ambient_SSS <empty> SSS_TYPE LabSSS_Curve <empty> mob_SSS misc_block_SSS ambientsss_brightness
|
||||||
@ -67,13 +67,13 @@ screen = [Direct_Light] [World] [Ambient_light] [Fog] [Post_Processing] [Clouds]
|
|||||||
|
|
||||||
### AMBIENT LIGHT
|
### AMBIENT LIGHT
|
||||||
screen.Ambient_light.columns=1
|
screen.Ambient_light.columns=1
|
||||||
screen.Ambient_light = [Torch_Colors] [Ambient_Colors] <skip> Ambient_SSS indirect_effect AO_Strength GI_Strength ambientOcclusionLevel HQ_SSGI ambientsss_brightness Hand_Held_lights
|
screen.Ambient_light = [Torch_Colors] [Ambient_Colors] MIN_LIGHT_AMOUNT indirect_effect <empty> <empty> AO_Strength GI_Strength Ambient_SSS ambientOcclusionLevel HQ_SSGI ambientsss_brightness Hand_Held_lights
|
||||||
|
|
||||||
screen.Torch_Colors.columns=1
|
screen.Torch_Colors.columns=1
|
||||||
screen.Torch_Colors = TORCH_AMOUNT Emissive_Brightness Emissive_Curve <skip> TORCH_R TORCH_G TORCH_B
|
screen.Torch_Colors = TORCH_AMOUNT Emissive_Brightness Emissive_Curve <empty> TORCH_R TORCH_G TORCH_B
|
||||||
|
|
||||||
screen.Ambient_Colors.columns=1
|
screen.Ambient_Colors.columns=1
|
||||||
screen.Ambient_Colors = ambient_brightness MIN_LIGHT_AMOUNT ambient_colortype ambient_temp <skip> AmbientLight_R AmbientLight_G AmbientLight_B
|
screen.Ambient_Colors = ambient_brightness MIN_LIGHT_AMOUNT ambient_colortype ambient_temp <empty> AmbientLight_R AmbientLight_G AmbientLight_B
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -103,19 +103,19 @@ screen = [Direct_Light] [World] [Ambient_light] [Fog] [Post_Processing] [Clouds]
|
|||||||
|
|
||||||
## SEASONS
|
## SEASONS
|
||||||
screen.Seasons.columns=1
|
screen.Seasons.columns=1
|
||||||
screen.Seasons = Seasons Season_Length Snowy_Winter <skip> [Summer_colors] [Fall_colors] [Winter_colors] [Spring_colors]
|
screen.Seasons = Seasons Season_Length Snowy_Winter <empty> [Summer_colors] [Fall_colors] [Winter_colors] [Spring_colors]
|
||||||
|
|
||||||
screen.Summer_colors.columns=1
|
screen.Summer_colors.columns=1
|
||||||
screen.Summer_colors = Summer_R Summer_G Summer_B <skip> Summer_Leaf_R Summer_Leaf_G Summer_Leaf_B
|
screen.Summer_colors = Summer_R Summer_G Summer_B <empty> Summer_Leaf_R Summer_Leaf_G Summer_Leaf_B
|
||||||
|
|
||||||
screen.Fall_colors.columns=1
|
screen.Fall_colors.columns=1
|
||||||
screen.Fall_colors = Fall_R Fall_G Fall_B <skip> Fall_Leaf_R Fall_Leaf_G Fall_Leaf_B
|
screen.Fall_colors = Fall_R Fall_G Fall_B <empty> Fall_Leaf_R Fall_Leaf_G Fall_Leaf_B
|
||||||
|
|
||||||
screen.Winter_colors.columns=1
|
screen.Winter_colors.columns=1
|
||||||
screen.Winter_colors = Winter_R Winter_G Winter_B <skip> Winter_Leaf_R Winter_Leaf_G Winter_Leaf_B
|
screen.Winter_colors = Winter_R Winter_G Winter_B <empty> Winter_Leaf_R Winter_Leaf_G Winter_Leaf_B
|
||||||
|
|
||||||
screen.Spring_colors.columns=1
|
screen.Spring_colors.columns=1
|
||||||
screen.Spring_colors = Spring_R Spring_G Spring_B <skip> Spring_Leaf_R Spring_Leaf_G Spring_Leaf_B
|
screen.Spring_colors = Spring_R Spring_G Spring_B <empty> Spring_Leaf_R Spring_Leaf_G Spring_Leaf_B
|
||||||
|
|
||||||
|
|
||||||
######## ATMOSPHERICS
|
######## ATMOSPHERICS
|
||||||
@ -139,7 +139,7 @@ screen = [Direct_Light] [World] [Ambient_light] [Fog] [Post_Processing] [Clouds]
|
|||||||
screen.Fog = VL_RENDER_RESOLUTION VL_SAMPLES BLOOMY_FOG Haze_amount RainFog_amount [TOD_fog] [Biome_Fog] [Cave_Fog] BorderFog Cloud_Fog
|
screen.Fog = VL_RENDER_RESOLUTION VL_SAMPLES BLOOMY_FOG Haze_amount RainFog_amount [TOD_fog] [Biome_Fog] [Cave_Fog] BorderFog Cloud_Fog
|
||||||
|
|
||||||
screen.TOD_fog.columns=2
|
screen.TOD_fog.columns=2
|
||||||
screen.TOD_fog = TOD_Fog_mult <skip> Morning_Uniform_Fog Morning_Cloudy_Fog Noon_Uniform_Fog Noon_Cloudy_Fog Evening_Uniform_Fog Evening_Cloudy_Fog Night_Uniform_Fog Night_Cloudy_Fog
|
screen.TOD_fog = TOD_Fog_mult <empty> Morning_Uniform_Fog Morning_Cloudy_Fog Noon_Uniform_Fog Noon_Cloudy_Fog Evening_Uniform_Fog Evening_Cloudy_Fog Night_Uniform_Fog Night_Cloudy_Fog
|
||||||
|
|
||||||
screen.Cave_Fog.columns=1
|
screen.Cave_Fog.columns=1
|
||||||
screen.Cave_Fog = Cave_fog CaveFogFallOff CaveFogColor_R CaveFogColor_G CaveFogColor_B
|
screen.Cave_Fog = Cave_fog CaveFogFallOff CaveFogColor_R CaveFogColor_G CaveFogColor_B
|
||||||
@ -156,10 +156,10 @@ screen = [Direct_Light] [World] [Ambient_light] [Fog] [Post_Processing] [Clouds]
|
|||||||
|
|
||||||
######## POST
|
######## POST
|
||||||
screen.Post_Processing.columns=1
|
screen.Post_Processing.columns=1
|
||||||
screen.Post_Processing = [TAA_OPTIONS] [Purkinje_effect] [Tonemapping] [Exposure] [DepthOfField] [Editing] <skip> SHARPENING BLOOM_STRENGTH BLOOM_QUALITY
|
screen.Post_Processing = [TAA_OPTIONS] [Purkinje_effect] [Tonemapping] [Exposure] [DepthOfField] [Editing] <empty> SHARPENING BLOOM_STRENGTH BLOOM_QUALITY
|
||||||
### TAA
|
### TAA
|
||||||
screen.TAA_OPTIONS.columns = 1
|
screen.TAA_OPTIONS.columns = 1
|
||||||
screen.TAA_OPTIONS= SCREENSHOT_MODE SPLIT_RENDER TAA BLEND_FACTOR <skip> TAA_UPSCALING SCALE_FACTOR
|
screen.TAA_OPTIONS= SCREENSHOT_MODE SPLIT_RENDER TAA BLEND_FACTOR <empty> TAA_UPSCALING SCALE_FACTOR
|
||||||
### DOF
|
### DOF
|
||||||
screen.DepthOfField.columns = 1
|
screen.DepthOfField.columns = 1
|
||||||
screen.DepthOfField = DOF_QUALITY DOF_ANAMORPHIC_RATIO AUTOFOCUS focal aperture MANUAL_FOCUS DoF_Adaptation_Speed FAR_BLUR_ONLY
|
screen.DepthOfField = DOF_QUALITY DOF_ANAMORPHIC_RATIO AUTOFOCUS focal aperture MANUAL_FOCUS DoF_Adaptation_Speed FAR_BLUR_ONLY
|
||||||
@ -168,7 +168,7 @@ screen = [Direct_Light] [World] [Ambient_light] [Fog] [Post_Processing] [Clouds]
|
|||||||
screen.Exposure = AUTO_EXPOSURE EXPOSURE_MULTIPLIER Exposure_Speed Manual_exposure_value
|
screen.Exposure = AUTO_EXPOSURE EXPOSURE_MULTIPLIER Exposure_Speed Manual_exposure_value
|
||||||
### TONEMAPS
|
### TONEMAPS
|
||||||
screen.Tonemapping.columns = 1
|
screen.Tonemapping.columns = 1
|
||||||
screen.Tonemapping = TONEMAP USE_ACES_COLORSPACE_APPROXIMATION SATURATION CROSSTALK <skip> FinalR FinalG FinalB
|
screen.Tonemapping = TONEMAP USE_ACES_COLORSPACE_APPROXIMATION SATURATION CROSSTALK <empty> FinalR FinalG FinalB
|
||||||
### PURKINJE
|
### PURKINJE
|
||||||
screen.Purkinje_effect.columns = 1
|
screen.Purkinje_effect.columns = 1
|
||||||
screen.Purkinje_effect = Purkinje_strength Purkinje_strength Purkinje_R Purkinje_G Purkinje_B Purkinje_Multiplier
|
screen.Purkinje_effect = Purkinje_strength Purkinje_strength Purkinje_R Purkinje_G Purkinje_B Purkinje_Multiplier
|
||||||
@ -289,7 +289,7 @@ uniform.float.noPuddleAreas = smooth( if(in(biome,5,16,17,18,26, 27, 28, 3, 4, 1
|
|||||||
|
|
||||||
|
|
||||||
# thank you sixthsurge!
|
# thank you sixthsurge!
|
||||||
# uniform.float.lightningFlash = smooth(if(equals(skyColor.r, skyColor.g, 0.01) && skyColor.r > 0.3, 1.0, 0.0), 0, 0.5)
|
uniform.float.lightningFlash = smooth(if(equals(skyColor.r, skyColor.g, 0.01) && skyColor.r > 0.3, 1.0, 0.0), 0, 1)
|
||||||
|
|
||||||
texture.noise=texture/noises.png
|
texture.noise=texture/noises.png
|
||||||
texture.composite.colortex6=texture/blueNoise.png
|
texture.composite.colortex6=texture/blueNoise.png
|
||||||
|
Loading…
x
Reference in New Issue
Block a user