diff --git a/Bliss_v2.0_(Chocapic13_Shaders_edit).zip b/Bliss_v2.0_(Chocapic13_Shaders_edit).zip deleted file mode 100644 index e451427..0000000 Binary files a/Bliss_v2.0_(Chocapic13_Shaders_edit).zip and /dev/null differ diff --git a/shaders/composite1.fsh b/shaders/composite1.fsh index c062a89..2ea0cde 100644 --- a/shaders/composite1.fsh +++ b/shaders/composite1.fsh @@ -151,6 +151,7 @@ vec3 viewToWorld(vec3 viewPosition) { #include "lib/waterBump.glsl" #include "lib/specular.glsl" +#define OVERWORLD #include "lib/diffuse_lighting.glsl" float lengthVec (vec3 vec){ diff --git a/shaders/gbuffers_all_particles.fsh b/shaders/gbuffers_all_particles.fsh index 4437baf..0576306 100644 --- a/shaders/gbuffers_all_particles.fsh +++ b/shaders/gbuffers_all_particles.fsh @@ -33,6 +33,7 @@ uniform vec3 cameraPosition; #include "lib/sky_gradient.glsl" #include "lib/volumetricClouds.glsl" +#define OVERWORLD #include "lib/diffuse_lighting.glsl" //faster and actually more precise than pow 2.2 diff --git a/shaders/gbuffers_all_translucent.fsh b/shaders/gbuffers_all_translucent.fsh index 7ce9373..aba0c73 100644 --- a/shaders/gbuffers_all_translucent.fsh +++ b/shaders/gbuffers_all_translucent.fsh @@ -69,6 +69,8 @@ flat varying vec3 avgAmbient; #include "lib/clouds.glsl" #include "lib/stars.glsl" #include "lib/volumetricClouds.glsl" + +#define OVERWORLD #include "lib/diffuse_lighting.glsl" diff --git a/shaders/lib/diffuse_lighting.glsl b/shaders/lib/diffuse_lighting.glsl index 50a1acc..b870160 100644 --- a/shaders/lib/diffuse_lighting.glsl +++ b/shaders/lib/diffuse_lighting.glsl @@ -1,7 +1,11 @@ // in this here file im doing all the lighting for sunlight, ambient light, torches, for solids and translucents. -//// OVERWORLD //// +#ifndef OVERWORLD +uniform float lightningFlash; +#endif +//// OVERWORLD //// +#ifdef OVERWORLD vec3 DoAmbientLighting (vec3 SkyColor, vec3 TorchColor, vec2 Lightmap, float skyLightDir){ // Lightmap.x = 0.0; // Lightmap.y = 1.0; @@ -41,8 +45,9 @@ vec3 DoDirectLighting(vec3 SunColor, float Shadow, float NdotL, float Subsurface return SunLight; } +#endif - +#ifdef NETHER //// NETHER //// vec3 DoAmbientLighting_Nether(vec3 FogColor, vec3 TorchColor, float Lightmap, vec3 Normal, vec3 np3, vec3 WorldPos){ @@ -59,6 +64,9 @@ vec3 DoAmbientLighting_Nether(vec3 FogColor, vec3 TorchColor, float Lightmap, ve return AmbientLight + TorchLight + LavaGlow; } +#endif + +#ifdef END //// END //// vec3 DoAmbientLighting_End(vec3 FogColor, vec3 TorchColor, float Lightmap, vec3 Normal, vec3 np3){ @@ -73,4 +81,5 @@ vec3 DoAmbientLighting_End(vec3 FogColor, vec3 TorchColor, float Lightmap, vec3 vec3 AmbientLight = vec3(0.5,0.75,1.0) * 0.05 + FogColor*clamp(1.1 + dot(Normal,np3),0.0,1.0)*0.5; return TorchLight + AmbientLight; -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/shaders/programs/all_particles.fsh b/shaders/programs/all_particles.fsh index 746e4d4..9b748fa 100644 --- a/shaders/programs/all_particles.fsh +++ b/shaders/programs/all_particles.fsh @@ -27,6 +27,8 @@ uniform vec3 cameraPosition; #include "/lib/settings.glsl" +#define END +#define NETHER #include "/lib/diffuse_lighting.glsl" vec3 toLinear(vec3 sRGB){ diff --git a/shaders/programs/all_translucent.fsh b/shaders/programs/all_translucent.fsh index a954294..853e14d 100644 --- a/shaders/programs/all_translucent.fsh +++ b/shaders/programs/all_translucent.fsh @@ -57,6 +57,8 @@ flat varying vec3 avgAmbient; #include "/lib/sky_gradient.glsl" #include "/lib/waterBump.glsl" +#define END +#define NETHER #include "/lib/diffuse_lighting.glsl" diff --git a/shaders/world-1/composite2.fsh b/shaders/world-1/composite2.fsh index fc15fbc..23a0a84 100644 --- a/shaders/world-1/composite2.fsh +++ b/shaders/world-1/composite2.fsh @@ -2,6 +2,8 @@ #extension GL_EXT_gpu_shader4 : enable #include "/lib/settings.glsl" + +#define NETHER #include "/lib/diffuse_lighting.glsl" diff --git a/shaders/world1/composite.fsh b/shaders/world1/composite.fsh index beeac68..f3fa914 100644 --- a/shaders/world1/composite.fsh +++ b/shaders/world1/composite.fsh @@ -2,6 +2,8 @@ #extension GL_EXT_gpu_shader4 : enable #include "/lib/settings.glsl" + +#define END #include "/lib/diffuse_lighting.glsl"