Skip to content

Commit

Permalink
Improved stars
Browse files Browse the repository at this point in the history
  • Loading branch information
hotsu0p committed Mar 24, 2024
1 parent acd14e6 commit 2e35152
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion shaders/entity.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ entity.10100=minecraft:item_frame minecraft:painting minecraft:glow_item_frame
entity.10301=minecraft:warden
entity.10101=minecraft:lightning_bolt
entity.10102=minecraft:end_crystal
#endif
entity.10103=
8 changes: 4 additions & 4 deletions shaders/item.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

item.89=minecraft:glowstone minecraft:beacon minecraft:sea_lantern minecraft:lantern minecraft:soul_lantern

item.50=minecraft:torch minecraft:cake minecraft:red_mushroom minecraft:sculk_catalyst minecraft:end_rod minecraft:redstone_torch minecraft:jack_o_lantern minecraft:shroomlight minecraft:lava_bucket minecraft:glow_lichen minecraft:small_amethyst_bud minecraft:medium_amethyst_bud minecraft:large_amethyst_bud minecraft:amethyst_cluster minecraft:glow_berries minecraft:ochre_froglight minecraft:verdant_froglight minecraft:pearlescent_froglight
item.50=minecraft:torch minecraft:red_mushroom minecraft:sculk_catalyst minecraft:end_rod minecraft:redstone_torch minecraft:jack_o_lantern minecraft:shroomlight minecraft:lava_bucket minecraft:glow_lichen minecraft:small_amethyst_bud minecraft:medium_amethyst_bud minecraft:large_amethyst_bud minecraft:amethyst_cluster minecraft:glow_berries minecraft:ochre_froglight minecraft:verdant_froglight minecraft:pearlescent_froglight
item.92= minecraft:cake
item.213=minecraft:magma_block

item.213=minecraft:magma_block

item.358=minecraft:filled_map
item.358=minecraft:filled_map

item.169=
#endif
1 change: 1 addition & 0 deletions shaders/program/gbuffers_basic.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ void main() {
albedo.rgb = rainbowColor;
}
#endif

}

/* DRAWBUFFERS:0 */
Expand Down
3 changes: 3 additions & 0 deletions shaders/program/gbuffers_entities.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ void main() {
float pulse = .15 * (1.0 + sin(frameTimeCounter * 1 * 3.14159265358979));
albedo.rgb = mix(albedo.rgb, vec3(0.0,0.0,0.0), pulse);
}
if (entityId == 10103){
albedo.rgb *= 10;
}
float lightningBolt = float(entityId == 10101);

if(lightningBolt > 0.5) {
Expand Down
5 changes: 2 additions & 3 deletions shaders/program/gbuffers_hand.glsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


//Settings//
#include "/lib/settings.glsl"

Expand Down Expand Up @@ -157,7 +155,7 @@ void main() {
#endif
lightmap.x = max(lightmap.x, GetHandItem(213));

float emissive = (GetHandItem(50) + GetHandItem(89) + GetHandItem(213));
float emissive = (GetHandItem(50) + GetHandItem(89) + GetHandItem(213) + GetHandItem(92));

float metalness = 0.0;
float emission = emissive * 0.25;
Expand Down Expand Up @@ -215,6 +213,7 @@ void main() {
}
#endif


#ifdef MULTICOLORED_BLOCKLIGHT
lightAlbedo = albedo.rgb + 0.00001;
lightAlbedo = sqrt(normalize(lightAlbedo) * emission * emissive);
Expand Down
3 changes: 2 additions & 1 deletion shaders/program/gbuffers_skybasic.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ void RoundSunMoon(inout vec3 color, vec3 viewPos, vec3 sunColor, vec3 moonColor)
vec3 sunMoonCol = mix(moonColor * moonVisibility, sunColor * sunVisibility, float(VoL > 0.0));
color += sun * sunMoonCol * 16.0;
}

// Function to draw star
void SunGlare(inout vec3 color, vec3 viewPos, vec3 lightCol) {
float VoL = dot(normalize(viewPos), lightVec);
Expand Down Expand Up @@ -106,7 +107,7 @@ void main() {

RoundSunMoon(albedo, viewPos.xyz, sunColor, moonColor);
#endif

#ifdef STARS
if (moonVisibility > 0.0) DrawStars(albedo.rgb, viewPos.xyz);
#endif
Expand Down
2 changes: 1 addition & 1 deletion shaders/program/gbuffers_skytextured.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void main() {

#ifdef END

albedo.rgb *= 0.02; // Apply fog factor to brightness
albedo.rgb *= 0.02;


#ifdef SKY_DESATURATION
Expand Down
4 changes: 2 additions & 2 deletions shaders/program/gbuffers_water.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ void main() {
emission *= dot(albedo.rgb, albedo.rgb) * 0.333;

#ifndef REFLECTION_TRANSLUCENT
glass = 100;
translucent = 0.0;
glass = 1;
translucent = -10.0;
#endif

vec3 screenPos = vec3(gl_FragCoord.xy / vec2(viewWidth, viewHeight), gl_FragCoord.z);
Expand Down
2 changes: 1 addition & 1 deletion shaders/shaders.properties
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ screen.CG_G=<empty> <empty> CG_GR CG_GG CG_GB CG_GI <empty> <empty> CG_GM CG_GC
screen.CG_B=<empty> <empty> CG_BR CG_BG CG_BB CG_BI <empty> <empty> CG_BM CG_BC
screen.CG_T=<empty> <empty> CG_TR CG_TG CG_TB CG_TI <empty> <empty> CG_TM

screen.EXTRAS=<empty> <empty> OUTLINE TOON_LIGHTMAP RETRO_FILTER <empty><empty> WORLD_CURVATURE WORLD_CURVATURE_SIZE HIGHLIGHT <empty><empty> BACKROOMS
screen.EXTRAS=<empty> <empty> OUTLINE TOON_LIGHTMAP RETRO_FILTER <empty><empty> WORLD_CURVATURE WORLD_CURVATURE_SIZE HIGHLIGHT <empty><empty>

screen.ANIMATION= WORLD_TIME_ANIMATION ANIMATION_SPEED <empty> <empty>WAVING_GRASS WAVING_CROP WAVING_PLANT WAVING_TALL_PLANT WAVING_LEAF WAVING_VINE <empty><empty> <empty><empty><empty> <empty>WAVING_WATER WAVING_LAVA WAVING_FIRE <empty> <empty> WAVING_LANTERN <empty><empty> WAVING_CHAIN WAVING_BELL

Expand Down

0 comments on commit 2e35152

Please sign in to comment.