add flag for twilight forest and aether dimensions in the overworld shader. remove dimension fallback selection settings (iris cant do that). add a few leaf IDs from twilight forest and aether

This commit is contained in:
Xonk
2025-03-23 21:02:40 -04:00
parent 034a7ad19e
commit 8226094fb2
183 changed files with 2098 additions and 54 deletions

View File

@ -104,7 +104,9 @@ block.56= minecraft:pale_hanging_moss minecraft:pale_oak_leaves minecraft:azalea
meadow:alpine_birch_leaves_hanging meadow:pine_leaves meadow:pine_leaves_2 \
natures_spirit:frosty_redwood_leaves natures_spirit:redwood_leaves natures_spirit:sugi_leaves natures_spirit:wisteria_leaves natures_spirit:white_wisteria_leaves natures_spirit:blue_wisteria_leaves natures_spirit:pink_wisteria_leaves natures_spirit:purple_wisteria_leaves natures_spirit:part_white_wisteria_leaves natures_spirit:part_blue_wisteria_leaves natures_spirit:part_pink_wisteria_leaves natures_spirit:part_purple_wisteria_leaves natures_spirit:frosty_fir_leaves natures_spirit:fir_leaves natures_spirit:willow_leaves natures_spirit:aspen_leaves natures_spirit:red_maple_leaves natures_spirit:orange_maple_leaves natures_spirit:yellow_maple_leaves natures_spirit:cypress_leaves natures_spirit:olive_leaves natures_spirit:joshua_leaves natures_spirit:ghaf_leaves natures_spirit:palo_verde_leaves natures_spirit:coconut_leaves natures_spirit:cedar_leaves natures_spirit:larch_leaves natures_spirit:yellow_larch_leaves natures_spirit:mahogany_leaves natures_spirit:saxaul_leaves \
vinery:dark_cherry_leaves vinery:apple_leaves \
westerosblocks:vine_jasmine westerosblocks:apple_fruit_leaves westerosblocks:apricot_fruit_leaves westerosblocks:cherry_fruit_leaves westerosblocks:purple_grape_fruit_leaves westerosblocks:lemon_fruit_leaves westerosblocks:lime_fruit_leaves westerosblocks:orange_fruit_leaves westerosblocks:peach_fruit_leaves westerosblocks:plum_fruit_leaves westerosblocks:pomegranate_fruit_leaves westerosblocks:weirwood_leaves westerosblocks:hop_fruit_leaves westerosblocks:olive_fruit_leaves westerosblocks:palm_leaves westerosblocks:white_grape_fruit_leaves
westerosblocks:vine_jasmine westerosblocks:apple_fruit_leaves westerosblocks:apricot_fruit_leaves westerosblocks:cherry_fruit_leaves westerosblocks:purple_grape_fruit_leaves westerosblocks:lemon_fruit_leaves westerosblocks:lime_fruit_leaves westerosblocks:orange_fruit_leaves westerosblocks:peach_fruit_leaves westerosblocks:plum_fruit_leaves westerosblocks:pomegranate_fruit_leaves westerosblocks:weirwood_leaves westerosblocks:hop_fruit_leaves westerosblocks:olive_fruit_leaves westerosblocks:palm_leaves westerosblocks:white_grape_fruit_leaves \
twilightforest:twilight_oak_leaves twilightforest:canopy_leaves twilightforest:dark_leaves twilightforest:hardened_dark_leaves \
aether:skyroot_leaves aether:golden_oak_leaves aether:crystal_leaves aether:crystal_fruit_leaves
####### ----- blocks with SSS ----- #######

View File

@ -8,27 +8,10 @@
# dimension.world-1 = minecraft:the_nether
# dimension.WHATEVER = somemod:whateverdimension
#if DIMENSION_FALLBACK_SHADER == 0
dimension.world0 = minecraft:overworld *
dimension.world-1 = minecraft:the_nether
dimension.world1 = minecraft:the_end
dimension.worldx =
#endif
#if DIMENSION_FALLBACK_SHADER == 1
dimension.world0 = minecraft:overworld
dimension.world-1 = minecraft:the_nether *
dimension.world1 = minecraft:the_end
dimension.worldx =
#endif
#if DIMENSION_FALLBACK_SHADER == 2
dimension.world0 = minecraft:overworld
dimension.world-1 = minecraft:the_nether
dimension.world1 = minecraft:the_end *
dimension.worldx =
#endif
#if DIMENSION_FALLBACK_SHADER == 3
dimension.world0 = minecraft:overworld
dimension.world-1 = minecraft:the_nether
dimension.world1 = minecraft:the_end
dimension.worldx = *
#endif
dimension.world0 = minecraft:overworld *
dimension.world-1 = minecraft:the_nether
dimension.world1 = minecraft:the_end
dimension.worldx =
dimension.world0_with_aether_tag = aether:the_aether
dimension.world0_with_twilight_forest_tag = twilightforest:twilight_forest

View File

@ -1316,7 +1316,11 @@ void main() {
orbitstar.xy *= rotationMatrix;
Background += stars(orbitstar) * 10.0 * clamp(-unsigned_WsunVec.y*2.0,0.0,1.0);
#if defined OVERWORLD_SHADER && defined TWILIGHT_FOREST_FLAG
Background += stars(orbitstar) * 100.0;
#else
Background += stars(orbitstar) * 10.0 * clamp(-unsigned_WsunVec.y*2.0,0.0,1.0);
#endif
#if !defined ambientLight_only && (RESOURCEPACK_SKY == 1 || RESOURCEPACK_SKY == 0)
Background += drawSun(dot(unsigned_WsunVec, feetPlayerPos_normalized), 0, DirectLightColor,vec3(0.0));
@ -1336,11 +1340,14 @@ void main() {
#if RESOURCEPACK_SKY == 1 || RESOURCEPACK_SKY == 2 || RESOURCEPACK_SKY == 3
vec3 resourcePackskyBox = skyboxCol * 50.0 * clamp(unsigned_WsunVec.y*255.0,0.1,1.0);
#ifdef SKY_GROUND
resourcePackskyBox *= atmosphereGround;
#ifdef ISOLATE_RESOURCEPACK_SKY
Background = resourcePackskyBox;
#else
#ifdef SKY_GROUND
resourcePackskyBox *= atmosphereGround;
#endif
Background += resourcePackskyBox;
#endif
Background += resourcePackskyBox;
#endif
#endif

View File

@ -529,12 +529,12 @@ void main() {
vec3 indirectLightColor = averageSkyCol / 1200.0;
vec3 indirectLightColor_dynamic = averageSkyCol_Clouds / 1200.0;
float cloudPlaneDistance = 0.0;
float THINGY = 0;
#if defined OVERWORLD_SHADER
// z0 = texture2D(depthtex0, tc + jitter/VL_RENDER_RESOLUTION).x;
// viewPos0 = toScreenSpace_DH(tc/RENDER_SCALE, z0, DH_z0);
vec4 VolumetricClouds = GetVolumetricClouds(viewPos0, BN, WsunVec, directLightColor, indirectLightColor, cloudPlaneDistance);
THINGY = cloudPlaneDistance-length(playerPos);
#ifdef CAVE_FOG
float skyhole = pow(clamp(1.0-pow(max(playerPos_normalized.y - 0.6,0.0)*5.0,2.0),0.0,1.0),2)* caveDetection;
@ -575,14 +575,5 @@ void main() {
gl_FragData[0] = clamp(VolumetricFog, 0.0, 65000.0);
// gl_FragData[0] = clamp(vec4(vec3(cloudPlaneDistance/1000.0),0), 0.0, 65000.0);
//
// vec4 currentFrame = VolumetricFog;
// vec4 previousFrame = texture2D(colortex10, gl_FragCoord.xy * texelSize);
// vec4 temporallyFilteredVL = VLTemporalFiltering(viewPos0, z0 >= 1.0, VolumetricFog);
// gl_FragData[1] = temporallyFilteredVL;
}

View File

@ -427,9 +427,6 @@ if (gl_FragCoord.x > 18.+257. && gl_FragCoord.y > 1. && gl_FragCoord.x < 18+257+
#endif
//Temporally accumulate sky and light values
vec3 frameHistory = texelFetch2D(colortex4,ivec2(gl_FragCoord.xy),0).rgb;
vec3 currentFrame = gl_FragData[0].rgb*150.;

View File

@ -159,6 +159,8 @@ void main() {
averageSkyCol_Clouds = max(normalize(averageSkyCol_Clouds + 1e-6) * min(luma(averageSkyCol_Clouds) * 3.0,2.5),0.0);
averageSkyCol = max(averageSkyCol * PLANET_GROUND_BRIGHTNESS,0.0) + minimumlight;
////////////////////////////////////////
/// --- SUNLIGHT/MOONLIGHT STUFF --- ///
////////////////////////////////////////
@ -178,6 +180,11 @@ void main() {
#endif
#if defined OVERWORLD_SHADER && defined TWILIGHT_FOREST_FLAG
lightSourceColor = vec3(0.0);
moonColor = vec3(0.0);
#endif
//////////////////////////////////
/// --- WEATHER PARAMETERS --- ///
//////////////////////////////////

View File

@ -510,11 +510,6 @@ option.AEROCHROME_MODE.comment = Infrared Film. Google "Aerochrome" to get an id
option.AEROCHROME_PINKNESS.comment = Higher = Pink. Lower = Red
option.AEROCHROME_WOOL_ENABLED.comment = Technically wool things should be affected but it ruins a lot of builds. Enable to be more technically correct.
value.DIMENSION_FALLBACK_SHADER.0 = overworld shader as fallback
value.DIMENSION_FALLBACK_SHADER.1 = nether shader as fallback
value.DIMENSION_FALLBACK_SHADER.2 = end shader as fallback
value.DIMENSION_FALLBACK_SHADER.3 = no shader as fallback
screen.Misc_Settings.comment = Random settings for DEBUGGING or other fun stuff.

View File

@ -130,6 +130,10 @@ vec3 calculateAtmosphere(vec3 background, vec3 viewVector, vec3 upVector, vec3 s
float high_sun = clamp(pow(sunVector.y+0.6,5),0.0,1.0) * 3.0; // make sunrise less blue, and allow sunset to be bluer
float low_sun = clamp(((1.0-abs(sunVector.y))*3.) - high_sun,1.0,2.0) ;
#if defined OVERWORLD_SHADER && defined TWILIGHT_FOREST_FLAG
low_sun = 1.5;
phaseSun = phaseSun * 3.0;
#endif
for (int i = 0; i < iSteps; ++i, position += increment) {
vec3 density = sky_density(length(position));

View File

@ -741,8 +741,6 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
// #define OLD_INDIRECT_SSS
#define DIMENSION_FALLBACK_SHADER 0 // [0 1 2 3]
///////////////////////////////////////////
// ----- DISTANT HORIZONS SETTINGS ----- //
///////////////////////////////////////////
@ -816,11 +814,14 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
#define debug_DEPTHTEX0 9
#define debug_DEPTHTEX1 10
#define DEBUG_VIEW debug_OFF // [debug_OFF debug_SHADOWMAP debug_NORMALS debug_SPECULAR debug_INDIRECT debug_DIRECT debug_VIEW_POSITION debug_DH_WATER_BLENDING debug_FILTERED_STUFF debug_DEPTHTEX0 debug_DEPTHTEX1]
#define ISOLATE_RESOURCEPACK_SKY
#if DEBUG_VIEW == debug_DEPTHTEX0 || DEBUG_VIEW == debug_DEPTHTEX1
#undef TAA
#endif
// fix settings
#ifdef ISOLATE_RESOURCEPACK_SKY
#endif
#ifdef RESPONSIVE_TAA
#endif
#ifdef DH_TAA_JITTER

View File

@ -440,6 +440,11 @@ vec4 GetVolumetricClouds(
float minHeight = CloudLayer0_height;
float maxHeight = cloudheight + minHeight;
#if defined OVERWORLD_SHADER && defined AETHER_FLAG
minHeight = CloudLayer0_height - 350.0;
maxHeight = cloudheight + minHeight;
#endif
float heightRelativeToClouds = clamp(1.0 - max(cameraPosition.y - minHeight,0.0) / 100.0 ,0.0,1.0);
#if defined DISTANT_HORIZONS

View File

@ -342,7 +342,7 @@ SHADER_VERSION_LABEL <empty> \
######## MISC SETTINGS
screen.Misc_Settings = [EXPERIMENTAL_STUFF] DEBUG_VIEW [the_end_orb] display_LUT WhiteWorld SSS_view ambientLight_only LIGHTNING_FLASH DISABLE_ENCHANT_GLINT DISABLE_VANILLA_EMISSIVES PARTICLE_RENDERING_FIX TRANSLUCENT_ENTITIES LIGHTING_EFFECTS_BLUR_FILTER [selection_box_outline] DIMENSION_FALLBACK_SHADER
screen.Misc_Settings = [EXPERIMENTAL_STUFF] DEBUG_VIEW [the_end_orb] display_LUT WhiteWorld SSS_view ambientLight_only LIGHTNING_FLASH DISABLE_ENCHANT_GLINT DISABLE_VANILLA_EMISSIVES PARTICLE_RENDERING_FIX TRANSLUCENT_ENTITIES LIGHTING_EFFECTS_BLUR_FILTER [selection_box_outline] ISOLATE_RESOURCEPACK_SKY
screen.EXPERIMENTAL_STUFF = CLOUDS_INTERSECT_TERRAIN BLOOMY_PARTICLES ORIGINAL_CHOCAPIC_SKY BIOME_TINT_WATER HYPER_DETAILED_WAVES OLD_BLOOM PLANET_GROUND_BRIGHTNESS LIT_PARTICLE_BRIGHTNESS WATER_CAUSTICS_BRIGHTNESS WATER_CAUSTICS_POWER OLD_CAVE_DETECTION FORCE_TRANSLUCENT_GLASS LARGE_WAVE_DISPLACEMENT OLD_INDIRECT_SSS

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/fogBehindTranslucent_pass.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/fogBehindTranslucent_pass.vsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite.vsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite9.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite9.vsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite10.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite10.vsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite11.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite11.vsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite12.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite12.vsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite1.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite1.vsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite2.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite2.vsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite3.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite3.vsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite4.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite4.vsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite5.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite5.vsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite6.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite6.vsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite7.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite7.vsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite8.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/composite8.vsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/deferred.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/deferred.vsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/deferred1.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/deferred1.vsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/deferred2.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/deferred2.vsh"

View File

@ -0,0 +1,6 @@
#version 330 compatibility
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/DH_generic.fsh"

View File

@ -0,0 +1,6 @@
#version 330 compatibility
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/DH_generic.vsh"

View File

@ -0,0 +1,31 @@
#version 120
//#extension GL_ARB_shader_texture_lod : disable
#include "/lib/settings.glsl"
flat varying int water;
varying vec2 texcoord;
varying float overdrawCull;
uniform sampler2D tex;
//////////////////////////////VOID MAIN//////////////////////////////
//////////////////////////////VOID MAIN//////////////////////////////
//////////////////////////////VOID MAIN//////////////////////////////
//////////////////////////////VOID MAIN//////////////////////////////
//////////////////////////////VOID MAIN//////////////////////////////
void main() {
if(water > 0){
discard;
return;
}
if(overdrawCull < 1.0){
discard;
return;
}
gl_FragData[0] = texture2D(tex, texcoord.xy);
}

View File

@ -0,0 +1,70 @@
#version 120
/*
!! DO NOT REMOVE !!
This code is from Chocapic13' shaders
Read the terms of modification and sharing before changing something below please !
!! DO NOT REMOVE !!
*/
#include "/lib/settings.glsl"
#define SHADOW_MAP_BIAS 0.5
const float PI = 3.1415927;
varying vec2 texcoord;
uniform mat4 shadowProjectionInverse;
uniform mat4 shadowProjection;
uniform mat4 shadowModelViewInverse;
uniform mat4 shadowModelView;
uniform mat4 gbufferProjection;
uniform mat4 gbufferProjectionInverse;
flat varying int water;
#include "/lib/Shadow_Params.glsl"
#define diagonal3(m) vec3((m)[0].x, (m)[1].y, m[2].z)
#define projMAD(m, v) (diagonal3(m) * (v) + (m)[3].xyz)
// uniform float far;
uniform float dhFarPlane;
#include "/lib/DistantHorizons_projections.glsl"
vec4 toClipSpace3(vec3 viewSpacePosition) {
// mat4 projection = DH_shadowProjectionTweak(gl_ProjectionMatrix);
return vec4(projMAD(gl_ProjectionMatrix, viewSpacePosition),1.0);
}
varying float overdrawCull;
// uniform int renderStage;
void main() {
water = 0;
if(gl_Color.a < 1.0) water = 1;
texcoord.xy = gl_MultiTexCoord0.xy;
vec3 position = mat3(gl_ModelViewMatrix) * vec3(gl_Vertex) + gl_ModelViewMatrix[3].xyz;
#ifdef DH_OVERDRAW_PREVENTION
vec3 worldpos = mat3(shadowModelViewInverse) * position + shadowModelViewInverse[3].xyz;
overdrawCull = 1.0 - clamp(1.0 - length(worldpos) / far,0.0,1.0);
#else
overdrawCull = 1.0;
#endif
#ifdef DISTORT_SHADOWMAP
gl_Position = BiasShadowProjection(toClipSpace3(position));
#else
gl_Position = toClipSpace3(position);
#endif
gl_Position.z /= 6.0;
}

View File

@ -0,0 +1,6 @@
#version 330 compatibility
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/DH_solid.fsh"

View File

@ -0,0 +1,6 @@
#version 330 compatibility
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/DH_solid.vsh"

View File

@ -0,0 +1,6 @@
#version 330 compatibility
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/DH_translucent.fsh"

View File

@ -0,0 +1,6 @@
#version 330 compatibility
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/DH_translucent.vsh"

View File

@ -0,0 +1,3 @@
#version 120
#include "/dimensions/final.fsh"

View File

@ -0,0 +1,3 @@
#version 120
#include "/dimensions/final.vsh"

View File

@ -0,0 +1,5 @@
#version 120
#define ENCHANT_GLINT
#include "/dimensions/all_vanilla_emissives.fsh"

View File

@ -0,0 +1,5 @@
#version 120
#define ENCHANT_GLINT
#include "/dimensions/all_vanilla_emissives.vsh"

View File

@ -0,0 +1,8 @@
#version 120
#define LINES
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_particles.fsh"

View File

@ -0,0 +1,8 @@
#version 120
#define LINES
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_particles.vsh"

View File

@ -0,0 +1,5 @@
#version 120
#define BEACON_BEAM
#include "/dimensions/all_vanilla_emissives.fsh"

View File

@ -0,0 +1,5 @@
#version 120
#define BEACON_BEAM
#include "/dimensions/all_vanilla_emissives.vsh"

View File

@ -0,0 +1,9 @@
#version 120
#define WORLD
#define BLOCKENTITIES
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_solid.fsh"

View File

@ -0,0 +1,9 @@
#version 120
#define WORLD
#define BLOCKENTITIES
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_solid.vsh"

View File

@ -0,0 +1,7 @@
#version 120
#define BLOCKENTITIES
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_translucent.fsh"

View File

@ -0,0 +1,7 @@
#version 120
#define BLOCKENTITIES
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_translucent.vsh"

View File

@ -0,0 +1,5 @@
#version 120
#define DAMAGE_BLOCK_EFFECT
#include "/dimensions/all_particles.fsh"

View File

@ -0,0 +1,5 @@
#version 120
#define DAMAGE_BLOCK_EFFECT
#include "/dimensions/all_particles.vsh"

View File

@ -0,0 +1,9 @@
#version 120
#define WORLD
#define ENTITIES
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_solid.fsh"

View File

@ -0,0 +1,10 @@
#version 120
#define WORLD
#define ENTITIES
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_solid.vsh"

View File

@ -0,0 +1,5 @@
#version 120
#define GLOWING
#include "/dimensions/all_vanilla_emissives.fsh"

View File

@ -0,0 +1,5 @@
#version 120
#define GLOWING
#include "/dimensions/all_vanilla_emissives.vsh"

View File

@ -0,0 +1,7 @@
#version 120
#define ENTITIES
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_translucent.fsh"

View File

@ -0,0 +1,7 @@
#version 120
#define ENTITIES
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_translucent.vsh"

View File

@ -0,0 +1,9 @@
#version 120
#define WORLD
#define HAND
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_solid.fsh"

View File

@ -0,0 +1,9 @@
#version 120
#define WORLD
#define HAND
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_solid.vsh"

View File

@ -0,0 +1,7 @@
#version 120
#define HAND
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_translucent.fsh"

View File

@ -0,0 +1,7 @@
#version 120
#define HAND
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_translucent.vsh"

View File

@ -0,0 +1,5 @@
#version 120
void main() {
discard;
}

View File

@ -0,0 +1,5 @@
#version 120
void main() {
gl_Position = ftransform();
}

View File

@ -0,0 +1,62 @@
#version 120
#include "/lib/settings.glsl"
#if RESOURCEPACK_SKY != 0
varying vec4 color;
varying vec2 texcoord;
uniform sampler2D texture;
uniform sampler2D depthtex0;
uniform int renderStage;
uniform vec2 texelSize;
float interleaved_gradientNoise(){
// vec2 coord = gl_FragCoord.xy + (frameCounter%40000);
vec2 coord = gl_FragCoord.xy ;
// vec2 coord = gl_FragCoord.xy;
float noise = fract( 52.9829189 * fract( (coord.x * 0.06711056) + (coord.y * 0.00583715)) );
return noise ;
}
vec3 toLinear(vec3 sRGB){
return sRGB * (sRGB * (sRGB * 0.305306011 + 0.682171111) + 0.012522878);
}
#endif
void main() {
#if RESOURCEPACK_SKY != 0
/* RENDERTARGETS:2 */
vec4 COLOR = texture2D(texture, texcoord.xy) * color;
bool isSun = renderStage == MC_RENDER_STAGE_SUN || renderStage == 4;
bool isMoon = renderStage == MC_RENDER_STAGE_MOON || renderStage == 5;
bool isSkyBox = (renderStage == MC_RENDER_STAGE_SKY || renderStage == MC_RENDER_STAGE_CUSTOM_SKY) || (renderStage == 1 || renderStage == 3);
#if RESOURCEPACK_SKY == 1
if(isMoon || isSun) { discard; return; }
#endif
#if RESOURCEPACK_SKY == 3
if(isSkyBox) { discard; return; }
#endif
vec3 NEWCOLOR = COLOR.rgb;
if(isSun) NEWCOLOR.rgb = COLOR.rgb * 10.0;
if(isMoon) NEWCOLOR.rgb = COLOR.rgb * 5.0;
if(isSkyBox) NEWCOLOR.rgb = COLOR.rgb * 2.0;
NEWCOLOR.rgb = toLinear(NEWCOLOR.rgb);
NEWCOLOR.rgb = max(NEWCOLOR.rgb - NEWCOLOR.rgb * interleaved_gradientNoise()*0.05, 0.0);
gl_FragData[0] = vec4(NEWCOLOR.rgb*0.1, COLOR.a);
#else
discard;
#endif
}

View File

@ -0,0 +1,43 @@
#version 120
#include "/lib/settings.glsl"
#if RESOURCEPACK_SKY != 0
#include "/lib/res_params.glsl"
/*
!! DO NOT REMOVE !!
This code is from Chocapic13' shaders
Read the terms of modification and sharing before changing something below please !
!! DO NOT REMOVE !!
*/
varying vec4 color;
varying vec2 texcoord;
uniform vec2 texelSize;
uniform int framemod8;
const vec2[8] offsets = vec2[8](vec2(1./8.,-3./8.),
vec2(-1.,3.)/8.,
vec2(5.0,1.)/8.,
vec2(-3,-5.)/8.,
vec2(-5.,5.)/8.,
vec2(-7.,-1.)/8.,
vec2(3,7.)/8.,
vec2(7.,-7.)/8.);
#endif
void main() {
gl_Position = ftransform();
#if RESOURCEPACK_SKY != 0
texcoord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).st;
color = gl_Color;
#ifdef TAA_UPSCALING
gl_Position.xy = gl_Position.xy * RENDER_SCALE + RENDER_SCALE * gl_Position.w - gl_Position.w;
#endif
#ifdef TAA
gl_Position.xy += offsets[framemod8] * gl_Position.w*texelSize;
#endif
#endif
}

View File

@ -0,0 +1,5 @@
#version 120
#define SPIDER_EYES
#include "/dimensions/all_vanilla_emissives.fsh"

View File

@ -0,0 +1,5 @@
#version 120
#define SPIDER_EYES
#include "/dimensions/all_vanilla_emissives.vsh"

View File

@ -0,0 +1,8 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#define WORLD
#include "/dimensions/all_solid.fsh"

View File

@ -0,0 +1,8 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#define WORLD
#include "/dimensions/all_solid.vsh"

View File

@ -0,0 +1,8 @@
#version 120
#define PARTICLES
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_particles.fsh"

View File

@ -0,0 +1,8 @@
#version 120
#define PARTICLES
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_particles.vsh"

View File

@ -0,0 +1,8 @@
#version 120
#define LIT
#define PARTICLES
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_particles.fsh"

View File

@ -0,0 +1,8 @@
#version 120
#define LIT
#define PARTICLES
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_particles.vsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_translucent.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_translucent.vsh"

View File

@ -0,0 +1,7 @@
#version 120
#define WEATHER
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_particles.fsh"

View File

@ -0,0 +1,7 @@
#version 120
#define WEATHER
#define OVERWORLD_SHADER
#define AETHER_FLAG
#include "/dimensions/all_particles.vsh"

View File

@ -0,0 +1,7 @@
#version 430 compatibility
#define RENDER_SETUP
#include "/lib/settings.glsl"
#include "/dimensions/setup.csh"

View File

@ -0,0 +1,37 @@
#version 120
#include "/lib/settings.glsl"
varying vec4 color;
varying vec2 texcoord;
uniform sampler2D tex;
uniform sampler2D noisetex;
//////////////////////////////VOID MAIN//////////////////////////////
//////////////////////////////VOID MAIN//////////////////////////////
//////////////////////////////VOID MAIN//////////////////////////////
//////////////////////////////VOID MAIN//////////////////////////////
//////////////////////////////VOID MAIN//////////////////////////////
float blueNoise(){
return fract(texelFetch2D(noisetex, ivec2(gl_FragCoord.xy)%512, 0).a + 1.0/1.6180339887 );
}
void main() {
vec4 shadowColor = vec4(texture2D(tex,texcoord.xy).rgb * color.rgb, texture2DLod(tex, texcoord.xy, 0).a);
#ifdef TRANSLUCENT_COLORED_SHADOWS
if(shadowColor.a > 0.9999) shadowColor.rgb = vec3(0.0);
#endif
gl_FragData[0] = shadowColor;
// gl_FragData[0] = vec4(texture2D(tex,texcoord.xy).rgb * color.rgb, texture2DLod(tex, texcoord.xy, 0).a);
#ifdef Stochastic_Transparent_Shadows
if(gl_FragData[0].a < blueNoise()) { discard; return;}
#endif
}

View File

@ -0,0 +1,278 @@
#version 120
#include "/lib/settings.glsl"
#ifdef IS_LPV_ENABLED
#extension GL_ARB_explicit_attrib_location: enable
#extension GL_ARB_shader_image_load_store: enable
#endif
#define RENDER_SHADOW
/*
!! DO NOT REMOVE !!
This code is from Chocapic13' shaders
Read the terms of modification and sharing before changing something below please !
!! DO NOT REMOVE !!
*/
#define SHADOW_MAP_BIAS 0.5
const float PI = 3.1415927;
varying vec2 texcoord;
uniform mat4 shadowProjectionInverse;
uniform mat4 shadowProjection;
uniform mat4 shadowModelViewInverse;
uniform mat4 shadowModelView;
uniform mat4 gbufferModelView;
uniform mat4 gbufferModelViewInverse;
uniform mat4 gbufferProjection;
uniform mat4 gbufferProjectionInverse;
uniform int hideGUI;
uniform vec3 cameraPosition;
uniform float frameTimeCounter;
uniform int frameCounter;
uniform float screenBrightness;
uniform vec3 sunVec;
uniform float aspectRatio;
uniform float sunElevation;
uniform vec3 sunPosition;
uniform float lightSign;
uniform float cosFov;
uniform vec3 shadowViewDir;
uniform vec3 shadowCamera;
uniform vec3 shadowLightVec;
uniform float shadowMaxProj;
attribute vec4 mc_midTexCoord;
varying vec4 color;
attribute vec4 mc_Entity;
uniform int blockEntityId;
uniform int entityId;
#include "/lib/Shadow_Params.glsl"
#include "/lib/bokeh.glsl"
#include "/lib/blocks.glsl"
#include "/lib/entities.glsl"
#ifdef IS_LPV_ENABLED
#ifdef IRIS_FEATURE_BLOCK_EMISSION_ATTRIBUTE
attribute vec4 at_midBlock;
#else
attribute vec3 at_midBlock;
#endif
uniform int currentRenderedItemId;
uniform int renderStage;
#include "/lib/voxel_common.glsl"
#include "/lib/voxel_write.glsl"
#endif
const float PI48 = 150.796447372*WAVY_SPEED;
float pi2wt = PI48*frameTimeCounter;
vec2 calcWave(in vec3 pos) {
float magnitude = abs(sin(dot(vec4(frameTimeCounter, pos),vec4(1.0,0.005,0.005,0.005)))*0.5+0.72)*0.013;
vec2 ret = (sin(pi2wt*vec2(0.0063,0.0015)*4. - pos.xz + pos.y*0.05)+0.1)*magnitude;
return ret;
}
vec3 calcMovePlants(in vec3 pos) {
vec2 move1 = calcWave(pos );
float move1y = -length(move1);
return vec3(move1.x,move1y,move1.y)*5.*WAVY_STRENGTH/255.0;
}
vec3 calcWaveLeaves(in vec3 pos, in float fm, in float mm, in float ma, in float f0, in float f1, in float f2, in float f3, in float f4, in float f5) {
float magnitude = abs(sin(dot(vec4(frameTimeCounter, pos),vec4(1.0,0.005,0.005,0.005)))*0.5+0.72)*0.013;
vec3 ret = (sin(pi2wt*vec3(0.0063,0.0224,0.0015)*1.5 - pos))*magnitude;
return ret;
}
vec3 calcMoveLeaves(in vec3 pos, in float f0, in float f1, in float f2, in float f3, in float f4, in float f5, in vec3 amp1, in vec3 amp2) {
vec3 move1 = calcWaveLeaves(pos , 0.0054, 0.0400, 0.0400, 0.0127, 0.0089, 0.0114, 0.0063, 0.0224, 0.0015) * amp1;
return move1*5.*WAVY_STRENGTH/255.;
}
bool intersectCone(float coneHalfAngle, vec3 coneTip , vec3 coneAxis, vec3 rayOrig, vec3 rayDir, float maxZ)
{
vec3 co = rayOrig - coneTip;
float prod = dot(normalize(co),coneAxis);
if (prod <= -coneHalfAngle) return true; //In view frustrum
float a = dot(rayDir,coneAxis)*dot(rayDir,coneAxis) - coneHalfAngle*coneHalfAngle;
float b = 2. * (dot(rayDir,coneAxis)*dot(co,coneAxis) - dot(rayDir,co)*coneHalfAngle*coneHalfAngle);
float c = dot(co,coneAxis)*dot(co,coneAxis) - dot(co,co)*coneHalfAngle*coneHalfAngle;
float det = b*b - 4.*a*c;
if (det < 0.) return false; // No intersection with either forward cone and backward cone
det = sqrt(det);
float t2 = (-b + det) / (2. * a);
if (t2 <= 0.0 || t2 >= maxZ) return false; //Idk why it works
return true;
}
#define diagonal3(m) vec3((m)[0].x, (m)[1].y, m[2].z)
#define projMAD(m, v) (diagonal3(m) * (v) + (m)[3].xyz)
// uniform float far;
uniform float dhFarPlane;
#include "/lib/DistantHorizons_projections.glsl"
vec4 toClipSpace3(vec3 viewSpacePosition) {
// mat4 projection = DH_shadowProjectionTweak(gl_ProjectionMatrix);
return vec4(projMAD(gl_ProjectionMatrix, viewSpacePosition),1.0);
}
vec3 viewToWorld(vec3 viewPos) {
vec4 pos;
pos.xyz = viewPos;
pos.w = 0.0;
pos = shadowModelViewInverse * pos;
return pos.xyz;
}
// uniform int renderStage;
// uniform mat4 gbufferModelViewInverse;
void main() {
texcoord.xy = gl_MultiTexCoord0.xy;
color = gl_Color;
vec3 position = mat3(gl_ModelViewMatrix) * vec3(gl_Vertex) + gl_ModelViewMatrix[3].xyz;
// playerpos = vec4(0.0);
// playerpos = gbufferModelViewInverse * (gl_ModelViewMatrix * gl_Vertex);
// mat4 Custom_ViewMatrix = BuildShadowViewMatrix(LightDir);
// mat4 Custom_ProjectionMatrix = BuildShadowProjectionMatrix();
// position = gl_Vertex.xyz;
// if((renderStage == 10 || renderStage == 12) && mc_Entity.x != 3000) {
// position = (shadowModelViewInverse * vec4(gl_Vertex.xyz,1.0)).xyz;
// }
// position = mat3(Custom_ViewMatrix) * position + Custom_ViewMatrix[3].xyz;
// HHHHHHHHH ITS THE JITTER DOF HERE TO SAY HELLO
// It turns out 'position' above is just viewPos lmao
// #ifdef DOF_JITTER_SHADOW
// // CLIP SPACE
// vec2 jitter = clamp(jitter_offsets[frameCounter % 64], -1.0, 1.0);
// jitter = rotate(radians(float(frameCounter))) * jitter;
// jitter.y *= aspectRatio;
// jitter.x *= DOF_ANAMORPHIC_RATIO;
// vec4 clipPos = gbufferProjection * vec4(position, 1.0);
// // CLIP SPACE -> VIEW SPACE
// vec3 viewPos = (gbufferProjectionInverse * clipPos).xyz;
// // Focus distance
// #if DOF_JITTER_FOCUS < 0
// float focusMul = clipPos.z - mix(pow(512.0, screenBrightness), 512.0 * screenBrightness, 0.25);
// #else
// float focusMul = clipPos.z - DOF_JITTER_FOCUS;
// #endif
// // CLIP SPACE -> SHADOW CLIP SPACE
// vec3 jitterViewPos = (gbufferProjectionInverse * vec4(jitter, 1.0, 1.0)).xyz;
// // vec3 jitterFeetPos = (gbufferModelViewInverse * vec4(jitterViewPos, 1.0)).xyz;
// // vec3 jitterShadowViewPos = (shadowModelView * vec4(jitterFeetPos, 1.0)).xyz;
// // vec4 jitterShadowClipPos = gl_ProjectionMatrix * vec4(jitterShadowViewPos, 1.0);
// // vec4 totalOffset = jitterShadowClipPos * JITTER_STRENGTH * focusMul * 1e-2;
// position += jitterViewPos * focusMul * 1e-2;
// if(focusMul < 10.0) {
// gl_Position = vec4(-1.0);
// return;
// }
// #endif
// #if defined IS_LPV_ENABLED || defined WAVY_PLANTS || !defined PLANET_CURVATURE
vec3 playerpos = mat3(shadowModelViewInverse) * position + shadowModelViewInverse[3].xyz;
// #endif
#if defined IS_LPV_ENABLED && defined MC_GL_EXT_shader_image_load_store
PopulateShadowVoxel(playerpos);
#endif
// #ifdef WAVY_PLANTS
// bool istopv = gl_MultiTexCoord0.t < mc_midTexCoord.t;
// if (
// (
// blockId == BLOCK_GROUND_WAVING || blockId == BLOCK_GROUND_WAVING_VERTICAL ||
// blockId == BLOCK_GRASS_SHORT || (blockId == BLOCK_GRASS_TALL_UPPER && istopv) ||
// blockId == BLOCK_SAPLING
// ) && length(position.xy) < 24.0
// ) {
// playerpos += calcMovePlants(playerpos + cameraPosition)*gl_MultiTexCoord1.y;
// position = mat3(shadowModelView) * playerpos + shadowModelView[3].xyz;
// }
// if (blockId == BLOCK_AIR_WAVING && length(position.xy) < 24.0) {
// playerpos += calcMoveLeaves(playerpos + cameraPosition, 0.0040, 0.0064, 0.0043, 0.0035, 0.0037, 0.0041, vec3(1.0,0.2,1.0), vec3(0.5,0.1,0.5))*gl_MultiTexCoord1.y;
// position = mat3(shadowModelView) * playerpos + shadowModelView[3].xyz;
// }
// #endif
int blockId = int(mc_Entity.x + 0.5);
vec3 worldpos = playerpos;
#ifdef WAVY_PLANTS
// also use normal, so up/down facing geometry does not get detatched from its model parts.
bool InterpolateFromBase = gl_MultiTexCoord0.t < max(mc_midTexCoord.t, abs(viewToWorld(normalize(gl_NormalMatrix * gl_Normal)).y));
if(
(
// these wave off of the ground. the area connected to the ground does not wave.
(InterpolateFromBase && (blockId == BLOCK_GRASS_TALL_LOWER || blockId == BLOCK_GROUND_WAVING || blockId == BLOCK_GRASS_SHORT || blockId == BLOCK_SAPLING || blockId == BLOCK_GROUND_WAVING_VERTICAL))
// these wave off of the ceiling. the area connected to the ceiling does not wave.
|| (!InterpolateFromBase && (blockId == BLOCK_VINE_OTHER))
// these wave off of the air. they wave uniformly
|| (blockId == BLOCK_GRASS_TALL_UPPER || blockId == BLOCK_AIR_WAVING)
) && length(position.xy) < 24.0
){
// apply displacement for waving plant blocks
worldpos += calcMovePlants(playerpos + cameraPosition) * max(gl_MultiTexCoord1.y,0.5);
// apply displacement for waving leaf blocks specifically, overwriting the other waving mode. these wave off of the air. they wave uniformly
if(blockId == BLOCK_AIR_WAVING) worldpos = playerpos + calcMoveLeaves(playerpos + cameraPosition, 0.0040, 0.0064, 0.0043, 0.0035, 0.0037, 0.0041, vec3(1.0,0.2,1.0), vec3(0.5,0.1,0.5))*gl_MultiTexCoord1.y;
}
#endif
#ifdef PLANET_CURVATURE
float curvature = length(worldpos) / (16*8);
worldpos.y -= curvature*curvature * CURVATURE_AMOUNT;
#endif
position = mat3(shadowModelView) * worldpos + shadowModelView[3].xyz;
#ifdef DISTORT_SHADOWMAP
if (entityId == ENTITY_SSS_MEDIUM || entityId == ENTITY_SLIME)
position.xyz = position.xyz - normalize(gl_NormalMatrix * gl_Normal) * 0.25;
gl_Position = BiasShadowProjection(toClipSpace3(position));
#else
gl_Position = toClipSpace3(position);
#endif
if (blockId == BLOCK_WATER) gl_Position.w = -1.0;
gl_Position.z /= 6.0;
}

View File

@ -0,0 +1,5 @@
#version 430 compatibility
#include "/lib/settings.glsl"
#include "/dimensions/shadowcomp.csh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define TWILIGHT_FOREST_FLAG
#include "/dimensions/fogBehindTranslucent_pass.fsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define TWILIGHT_FOREST_FLAG
#include "/dimensions/fogBehindTranslucent_pass.vsh"

View File

@ -0,0 +1,6 @@
#version 120
#define OVERWORLD_SHADER
#define TWILIGHT_FOREST_FLAG
#include "/dimensions/composite.fsh"

Some files were not shown because too many files have changed in this diff Show More