diff --git a/shaders/composite1.fsh b/shaders/composite1.fsh index 29f58ea..871eb11 100644 --- a/shaders/composite1.fsh +++ b/shaders/composite1.fsh @@ -860,7 +860,7 @@ void main() { #ifndef ambientLight_only background += drawSun(dot(lightCol.a * WsunVec, np3),0, DirectLightColor,vec3(0.0)) ; // sun // vec3 moon = drawSun(dot(lightCol.a * -WsunVec, np3),0, DirectLightColor/5,vec3(0.0)) ; // moon - background += Moon(np3, -WsunVec, DirectLightColor*25, background); // moon + background += Moon(np3, -WsunVec, blackbody2(12000), background); // moon #endif background *= clamp( (np3.y+ 0.02)*5.0 + (eyeAltitude - 319)/800000 ,0.0,1.0); diff --git a/shaders/gbuffers_all_solid.fsh b/shaders/gbuffers_all_solid.fsh index 127f2c1..eaff540 100644 --- a/shaders/gbuffers_all_solid.fsh +++ b/shaders/gbuffers_all_solid.fsh @@ -83,10 +83,7 @@ flat varying float EMISSIVE; flat varying int LIGHTNING; flat varying float HELD_ITEM_BRIGHTNESS; -#ifdef ENTITIES - #define ENTITY_PHYSICSMOD_SNOW 829925 -#endif - +flat varying int PHYSICSMOD_SNOW; uniform float noPuddleAreas; @@ -474,7 +471,7 @@ void main() { NormalTex.xy = NormalTex.xy*2.0-1.0; NormalTex.z = clamp(sqrt(1.0 - dot(NormalTex.xy, NormalTex.xy)),0.0,1.0) ; - normal = applyBump(tbnMatrix, NormalTex.xyz, mix(1.0,1-Puddle_shape,rainfall) ); + if(PHYSICSMOD_SNOW < 1)normal = applyBump(tbnMatrix, NormalTex.xyz, mix(1.0,1-Puddle_shape,rainfall) ); // #ifdef ENTITIES // if(NameTags == 1) normal = vec3(1); diff --git a/shaders/gbuffers_all_solid.vsh b/shaders/gbuffers_all_solid.vsh index 8103d90..2768526 100644 --- a/shaders/gbuffers_all_solid.vsh +++ b/shaders/gbuffers_all_solid.vsh @@ -61,6 +61,9 @@ flat varying int NameTags; in vec3 at_velocity; out vec3 velocity; + +flat varying int PHYSICSMOD_SNOW; + uniform mat4 gbufferModelView; uniform mat4 gbufferModelViewInverse; attribute vec4 mc_midTexCoord; @@ -151,6 +154,9 @@ float densityAtPos(in vec3 pos){ return mix(xy.r,xy.g, f.y); } +float luma(vec3 color) { + return dot(color,vec3(0.21, 0.72, 0.07)); +} //////////////////////////////VOID MAIN////////////////////////////// //////////////////////////////VOID MAIN////////////////////////////// @@ -208,14 +214,22 @@ void main() { velocity = at_velocity; NameTags = 0; - + +PHYSICSMOD_SNOW = 0; + #ifdef ENTITIES +#ifdef ENTITY_PHYSICSMOD_SNOW + if(entityId == 829925) PHYSICSMOD_SNOW = 1; +#endif + + // try and single out nametag text and then discard nametag background // if( dot(gl_Color.rgb, vec3(1.0/3.0)) < 1.0) NameTags = 1; // if(gl_Color.a < 1.0) NameTags = 1; // if(gl_Color.a >= 0.24 && gl_Color.a <= 0.25 ) gl_Position = vec4(10,10,10,1); - + + #endif diff --git a/shaders/gbuffers_entities.fsh b/shaders/gbuffers_entities.fsh index 43a8712..2576694 100644 --- a/shaders/gbuffers_entities.fsh +++ b/shaders/gbuffers_entities.fsh @@ -3,4 +3,6 @@ #define WORLD #define ENTITIES +#define ENTITY_PHYSICSMOD_SNOW 829925 + #include "gbuffers_all_solid.fsh" \ No newline at end of file diff --git a/shaders/gbuffers_entities.vsh b/shaders/gbuffers_entities.vsh index 3666d75..2182ca9 100644 --- a/shaders/gbuffers_entities.vsh +++ b/shaders/gbuffers_entities.vsh @@ -3,4 +3,5 @@ #define WORLD #define ENTITIES +#define ENTITY_PHYSICSMOD_SNOW 829925 #include "gbuffers_all_solid.vsh" \ No newline at end of file diff --git a/shaders/lib/oceans.glsl b/shaders/lib/oceans.glsl index 73c0d43..3f0560d 100644 --- a/shaders/lib/oceans.glsl +++ b/shaders/lib/oceans.glsl @@ -3,7 +3,10 @@ #define PHYSICS_OCEAN_SUPPORT // at the top of your file. When used my mod no longer injects code into // your shaderpack. It replaces this define statement (before compilation) with - +#define PHYSICS_OCEAN +// so you can use +#ifdef PHYSICS_OCEAN +#endif #ifdef PhysicsMod_support // to customize the water for the physics ocean