tiny tweaks

This commit is contained in:
Xonk 2023-06-20 00:19:32 -04:00
parent cf945dcb8c
commit 5aea35fe25
6 changed files with 26 additions and 9 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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

View File

@ -3,4 +3,6 @@
#define WORLD
#define ENTITIES
#define ENTITY_PHYSICSMOD_SNOW 829925
#include "gbuffers_all_solid.fsh"

View File

@ -3,4 +3,5 @@
#define WORLD
#define ENTITIES
#define ENTITY_PHYSICSMOD_SNOW 829925
#include "gbuffers_all_solid.vsh"

View File

@ -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