Add vanilla stars to resource pack sky, fix resource pack sky (1.21.11+), fix selection box on 1.21.1, fix entites/hand when in front of voxy water, fix DH/voxy water causing small refraction on entities

This commit is contained in:
Merlin1809
2026-02-02 19:35:41 +01:00
parent 256f6cadfc
commit 8334902f06
28 changed files with 305 additions and 352 deletions
+1 -1
View File
@@ -507,7 +507,7 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
if(blockBreak.a > 0.99) {
gl_FragData[2] = blockBreak;
} else {
gl_FragData[2] = vec4(encodeVec2(vec2(0.5)), encodeVec2(GLASS_TINT_COLORS.rg), encodeVec2(GLASS_TINT_COLORS.ba), 0.0);
gl_FragData[2] = vec4(0.0, encodeVec2(GLASS_TINT_COLORS.rg), encodeVec2(GLASS_TINT_COLORS.ba), 0.5);
}
gl_FragData[3] = vec4(1, 1, encodeVec2(lightmapCoords.x, lightmapCoords.y), 1);
+5 -1
View File
@@ -397,7 +397,11 @@ void main() {
gl_FragData[2] = vec4(0.0);
#ifdef LINES
bool selectionBox = renderStage == MC_RENDER_STAGE_OUTLINE;
#if MC_VERSION == 12101
bool selectionBox = dot(color.rgb,vec3(0.33333)) < 0.00001;
#else
bool selectionBox = renderStage == MC_RENDER_STAGE_OUTLINE;
#endif
#ifndef SELECT_BOX
if(selectionBox) discard;
#endif
+10 -18
View File
@@ -1643,15 +1643,17 @@ void main() {
// vec3 orbitstar = vec3(feetPlayerPos_normalized.x,abs(feetPlayerPos_normalized.y),feetPlayerPos_normalized.z); orbitstar.x -= WsunVec.x*0.2;
vec3 worldDir = normalize(mat3(gbufferModelViewInverse) * toScreenSpace(vec3(texcoord/RENDER_SCALE,1.0)));
vec3 orbitstar = customRotation(sunPathRotation, worldTimeSmooth) * worldDir;
#if RESOURCEPACK_SKY == 0 || RESOURCEPACK_SKY == 3
vec3 orbitstar = customRotation(sunPathRotation, worldTimeSmooth) * worldDir;
vec3 starColor = vec3(1.0);
#if defined OVERWORLD_SHADER && defined TWILIGHT_FOREST_FLAG
float stars = stars(orbitstar, starColor) * 100.0;
Background += stars * starColor;
#else
float stars = stars(orbitstar, starColor) * 10.0;
Background += stars * starColor * mix(clamp(-unsigned_WsunVec.y*2.0,0.0,1.0), 1.0, clamp(cameraPosition.y-15000.0, 0.0, 45000.0)/45000.0);
vec3 starColor = vec3(1.0);
#if defined OVERWORLD_SHADER && defined TWILIGHT_FOREST_FLAG
float stars = stars(orbitstar, starColor) * 100.0;
Background += stars * starColor;
#else
float stars = stars(orbitstar, starColor) * 10.0;
Background += stars * starColor * mix(clamp(-unsigned_WsunVec.y*2.0,0.0,1.0), 1.0, clamp(cameraPosition.y-15000.0, 0.0, 45000.0)/45000.0);
#endif
#endif
#if !defined AMBIENT_LIGHT_ONLY && (RESOURCEPACK_SKY == 1 || RESOURCEPACK_SKY == 0)
@@ -1793,18 +1795,8 @@ void main() {
if(translucentMasks > 0.0 && !hand){
// water absorbtion will impact ALL light coming up from terrain underwater.
gl_FragData[0].rgb *= Absorbtion;
// #if defined DISTANT_HORIZONS || defined VOXY
// float DH_mixedLinearZ = sqrt(texelFetch(colortex12,ivec2(gl_FragCoord.xy),0).a/65000.0);
// vec4 vlBehingTranslucents = BilateralUpscale_VLFOG(colortex13, colortex12, DH_mixedLinearZ);
// #else
// vec4 vlBehingTranslucents = BilateralUpscale_VLFOG(colortex13, depthtex1, ld(z));
// #endif
// gl_FragData[0].rgb = gl_FragData[0].rgb * vlBehingTranslucents.a + vlBehingTranslucents.rgb;
}
////// DEBUG VIEW STUFF
#if DEBUG_VIEW == debug_SHADOWMAP
gl_FragData[0].rgb = vec3(1.0) * (Shadows * NdotL * 0.9 + 0.1);
+4 -2
View File
@@ -596,7 +596,7 @@ void main() {
////// --------------- UNPACK TRANSLUCENT GBUFFERS --------------- //////
vec4 data = texelFetch(colortex11,ivec2(texcoord/texelSize),0).rgba;
vec4 unpack0 = vec4(decodeVec2(data.r),decodeVec2(data.g)) ;
vec4 unpack0 = vec4(decodeVec2(data.r),decodeVec2(data.g));
vec2 unpack1 = decodeVec2(data.b);
vec4 albedo = vec4(unpack0.ba,unpack1);
@@ -636,7 +636,9 @@ void main() {
#if FAKE_REFRACTION_AMOUNT > 0
vec3 color;
#if defined DISTANT_HORIZONS || defined VOXY
if(isDHrange || hand) {
bool isLOD = abs(data.a - 0.5) < 0.01;
if(isDHrange || hand || isLOD) {
color = texture(colortex3, texcoord).rgb;
}
else
+13
View File
@@ -20,6 +20,13 @@ const int colortex12Format = RGBA16F; // DISTANT HORIZONS + VANILLA MIXED DEP
const int colortex13Format = RGBA16F; // low res VL (composite5->composite15)
const int colortex14Format = RGBA16; // rg = SSAO and SS-SSS. a = skylightmap for translucents.
const int colortex15Format = RGBA8; // flat normals and vanilla AO
#ifdef VOXY
const int colortex16Format = RGBA16F; // voxy translucent stuff...
#endif
#if MAX_COLOR_BUFFERS > 20 || defined VOXY
const int colortex17Format = RGBA16F; // resource pack sky
#endif
*/
//no need to clear the buffers, saves a few fps
@@ -39,6 +46,12 @@ const bool colortex12Clear = false;
const bool colortex13Clear = false;
const bool colortex14Clear = true;
const bool colortex15Clear = false;
#ifdef VOXY
const bool colortex16Clear = true;
#endif
#if MAX_COLOR_BUFFERS > 20 || defined VOXY
const bool colortex17Clear = true;
#endif
#ifdef SCREENSHOT_MODE
+31 -7
View File
@@ -12,6 +12,8 @@ uniform sampler2D depthtex0;
#endif
uniform sampler2D colortex1;
uniform sampler2D colortex2;
uniform sampler2D colortex16;
uniform sampler2D colortex17;
uniform vec2 texelSize;
@@ -29,18 +31,21 @@ float interleaved_gradientNoise(){
//////////////////////////////VOID MAIN//////////////////////////////
#if RESOURCEPACK_SKY != 0
/* RENDERTARGETS:1,2 */
/* RENDERTARGETS:2,1 */
#elif defined VOXY
/* RENDERTARGETS:2 */
#endif
void main() {
bool depthCheck = texelFetch(depthtex0, ivec2(gl_FragCoord.xy), 0).x < 1.0;
#if RESOURCEPACK_SKY != 0
vec2 texcoord = gl_FragCoord.xy * texelSize;
gl_FragData[0] = texelFetch(colortex1, ivec2(gl_FragCoord.xy),0);
gl_FragData[1] = texelFetch(colortex1, ivec2(gl_FragCoord.xy),0);
if(
texelFetch(depthtex0, ivec2(gl_FragCoord.xy), 0).x < 1.0
depthCheck
#if defined DISTANT_HORIZONS || defined VOXY
|| texelFetch(dhVoxyDepthTex, ivec2(gl_FragCoord.xy), 0).x < 1.0
@@ -50,14 +55,33 @@ void main() {
// doing this for precision reasons, DH does NOT like depth => 1.0
}else{
vec3 skyColor = texelFetch(colortex2, ivec2(gl_FragCoord.xy),0).rgb;
#if MAX_COLOR_BUFFERS > 20 || defined VOXY
vec3 skyColor = texelFetch(colortex17, ivec2(gl_FragCoord.xy),0).rgb;
#else
vec3 skyColor = texelFetch(colortex2, ivec2(gl_FragCoord.xy),0).rgb;
#endif
skyColor.rgb = max(skyColor.rgb - skyColor.rgb * interleaved_gradientNoise()*0.05, 0.0);
gl_FragData[0].rgb = skyColor/50.0;
gl_FragData[0].a = 0.0;
gl_FragData[1].rgb = skyColor/50.0;
gl_FragData[1].a = 0.0;
}
#endif
#ifdef VOXY
if(depthCheck) {
#endif
#if RESOURCEPACK_SKY != 0 && (MAX_COLOR_BUFFERS < 20 && !defined VOXY)
gl_FragData[0] = vec4(0.0);
#else
gl_FragData[0] = texelFetch(colortex2, ivec2(gl_FragCoord.xy), 0);
#endif
#ifdef VOXY
} else {
gl_FragData[0] = texelFetch(colortex16, ivec2(gl_FragCoord.xy), 0);
}
gl_FragData[1] = vec4(0,0,0,0);
#endif
}
+48
View File
@@ -0,0 +1,48 @@
#include "/lib/settings.glsl"
#if RESOURCEPACK_SKY == 1 || RESOURCEPACK_SKY == 2
in vec4 color;
uniform int renderStage;
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 == 1 || RESOURCEPACK_SKY == 2
#if MAX_COLOR_BUFFERS > 20 || defined VOXY
/* RENDERTARGETS:17 */
#else
/* RENDERTARGETS:2 */
#endif
bool isStars = renderStage == MC_RENDER_STAGE_STARS;
if(!isStars) discard;
vec4 COLOR = color;
vec3 NEWCOLOR = COLOR.rgb * 5.0 * STARS_BRIGHTNESS;
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
}
+41
View File
@@ -0,0 +1,41 @@
#include "/lib/settings.glsl"
#if RESOURCEPACK_SKY == 1 || RESOURCEPACK_SKY == 2
#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 !!
*/
out vec4 color;
out 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 == 1 || RESOURCEPACK_SKY == 2
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
}
+63
View File
@@ -0,0 +1,63 @@
#include "/lib/settings.glsl"
#if RESOURCEPACK_SKY != 0
in vec4 color;
in vec2 texcoord;
uniform sampler2D gtexture;
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
#if MAX_COLOR_BUFFERS > 20 || defined VOXY
/* RENDERTARGETS:17 */
#else
/* RENDERTARGETS:2 */
#endif
vec4 COLOR = texture(gtexture, 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
}
+42
View File
@@ -0,0 +1,42 @@
#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 !!
*/
out vec4 color;
out 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
}
+1 -1
View File
@@ -6,7 +6,7 @@
"version": 1,
"opaqueDrawBuffers": [1, 8, 15],
"excludeLodsFromVanillaDepth": true,
"translucentDrawBuffers": [2, 7, 11, 14],
"translucentDrawBuffers": [16, 7, 11, 14],
#ifdef TAA
"taaOffset": "{
const vec2[4] offsets = vec2[4](
+1 -1
View File
@@ -350,7 +350,7 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
if (isWater) GLASS_TINT_COLORS.rgb = toLinear(parameters.tinting.rgb);
#endif
gbuffer_data_2 = vec4(encodeVec2(vec2(0.5)), encodeVec2(GLASS_TINT_COLORS.rg), encodeVec2(GLASS_TINT_COLORS.ba), 0.0);
gbuffer_data_2 = vec4(0.0, encodeVec2(GLASS_TINT_COLORS.rg), encodeVec2(GLASS_TINT_COLORS.ba), 0.5);
gbuffer_data_3 = vec4(1, 1, encodeVec2(parameters.lightMap), 1);
+2 -2
View File
@@ -1,6 +1,6 @@
option.SHADER_VERSION_LABEL = §d§lECLIPSE§r - A Bliss Edit
prefix.SHADER_VERSION_LABEL = V
value.SHADER_VERSION_LABEL.482 = 6.1.0
value.SHADER_VERSION_LABEL.482 = 6.1.1
# if you're here to translate, this is not a joke, these do what they say
profile.POTATO=§4Potato
@@ -1199,7 +1199,7 @@ screen.Post_Processing.comment = Configure settings for all post processing effe
option.LUMINANCE_CURVE.comment = Enable the tone curve. This is independent from color grading and is applied first.
option.COLOR_GRADING_ENABLED.comment = Enable color grading. The RGB sliders will not affect the brightness. This is applied after the tone curve
option.RESOURCEPACK_SKY.comment =§cWARNING: This setting, IF USED, will cause broken rendering for: lead ropes, fishing lines, and possibly some modded entities!§r. Toggle resourcepack sky support. Configure settings to use the whole resourcepack sky, or keep the shader's sun and moon. §aPERFORMANCE COST:§r very low
option.RESOURCEPACK_SKY.comment =§cWARNING: This setting, IF USED, will cause broken rendering for: selection box, lead ropes, fishing lines, and possibly some modded entities (FIXED IN 1.21.11+)! Incompatible with custom moon rotation! §r. Toggle resourcepack sky support. Configure settings to use the whole resourcepack sky, or keep the shader's sun and moon. §aPERFORMANCE COST:§r very low
option.SKY_GROUND = Atmosphere Ground
option.MATERIAL_AO.comment = Toggle the use of ambient occlusion based on what the resourcepack provides. §aPERFORMANCE COST:§r very low
+1 -1
View File
@@ -1,6 +1,6 @@
option.SHADER_VERSION_LABEL = §d§lECLIPSE§r - Bliss 编辑版
prefix.SHADER_VERSION_LABEL = 版本
value.SHADER_VERSION_LABEL.482 = 6.1.0
value.SHADER_VERSION_LABEL.482 = 6.1.1
# 如果你是来翻译的,这不是玩笑,这些选项的功能正如其名
profile.POTATO=§4土豆 (极低配置)
+4
View File
@@ -988,6 +988,10 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
#define RESOURCEPACK_SKY 0 // [0 1 2 3]
#if RESOURCEPACK_SKY >= 2
#undef CUSTOM_MOON_ROTATION
#endif
#ifdef IS_IRIS
// #define TRANSLUCENT_ENTITIES
#endif
+8 -3
View File
@@ -18,7 +18,7 @@ profile.ULTRA = !QUARTER_RES_SSR TERRAIN_SHADOW_ON_CLOUDS LP
clouds=off
stars=false
vignette=false
underwaterOverlay=false
dynamicHandLight=true
@@ -27,7 +27,6 @@ separateAo = true
rain.depth = false
beacon.beam.depth = true
sky = false
stars = false
iris.features.required = SSBO
@@ -105,6 +104,12 @@ iris.features.optional = ENTITY_TRANSLUCENT REVERSED_CULLING COMPUTE_SHADERS CUS
moon=false
#endif
#if RESOURCEPACK_SKY == 1 || RESOURCEPACK_SKY == 2
stars=true
#else
stars=false
#endif
particles.before.deferred=false
particles.ordering=after
@@ -148,7 +153,7 @@ program.world0/composite4.enabled = TAA_UPSCALING
program.world1/composite4.enabled = TAA_UPSCALING
program.world-1/composite4.enabled = TAA_UPSCALING
#if RESOURCEPACK_SKY == 0
#if RESOURCEPACK_SKY == 0 && !defined VOXY
program.world0/deferred2.enabled = false
program.world1/deferred2.enabled = false
program.world-1/deferred2.enabled = false
+3 -3
View File
@@ -1,5 +1,5 @@
#version 430 compatibility
void main() {
discard;
}
#define OVERWORLD_SHADER
#include "/dimensions/skybasic.fsh"
+3 -3
View File
@@ -1,5 +1,5 @@
#version 430 compatibility
void main() {
gl_Position = ftransform();
}
#define OVERWORLD_SHADER
#include "/dimensions/skybasic.vsh"
+2 -59
View File
@@ -1,62 +1,5 @@
#version 430 compatibility
#include "/lib/settings.glsl"
#if RESOURCEPACK_SKY != 0
in vec4 color;
in vec2 texcoord;
uniform sampler2D gtexture;
uniform sampler2D depthtex0;
uniform int renderStage;
uniform vec2 texelSize;
#define OVERWORLD_SHADER
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 = texture(gtexture, 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
}
#include "/dimensions/skytextured.fsh"
+2 -40
View File
@@ -1,43 +1,5 @@
#version 430 compatibility
#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 !!
*/
out vec4 color;
out 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.);
#define OVERWORLD_SHADER
#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
}
#include "/dimensions/skytextured.vsh"
@@ -1,5 +1,5 @@
#version 430 compatibility
void main() {
discard;
}
#define OVERWORLD_SHADER
#include "/dimensions/skybasic.fsh"
@@ -1,5 +1,5 @@
#version 430 compatibility
void main() {
gl_Position = ftransform();
}
#define OVERWORLD_SHADER
#include "/dimensions/skybasic.vsh"
@@ -1,62 +1,5 @@
#version 430 compatibility
#include "/lib/settings.glsl"
#if RESOURCEPACK_SKY != 0
in vec4 color;
in vec2 texcoord;
uniform sampler2D gtexture;
uniform sampler2D depthtex0;
uniform int renderStage;
uniform vec2 texelSize;
#define OVERWORLD_SHADER
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 = texture(gtexture, 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
}
#include "/dimensions/skytextured.fsh"
@@ -1,43 +1,5 @@
#version 430 compatibility
#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 !!
*/
out vec4 color;
out 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.);
#define OVERWORLD_SHADER
#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
}
#include "/dimensions/skytextured.vsh"
@@ -1,5 +1,5 @@
#version 430 compatibility
void main() {
discard;
}
#define OVERWORLD_SHADER
#include "/dimensions/skybasic.fsh"
@@ -1,5 +1,5 @@
#version 430 compatibility
void main() {
gl_Position = ftransform();
}
#define OVERWORLD_SHADER
#include "/dimensions/skybasic.vsh"
@@ -1,62 +1,5 @@
#version 430 compatibility
#include "/lib/settings.glsl"
#if RESOURCEPACK_SKY != 0
in vec4 color;
in vec2 texcoord;
uniform sampler2D gtexture;
uniform sampler2D depthtex0;
uniform int renderStage;
uniform vec2 texelSize;
#define OVERWORLD_SHADER
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 = texture(gtexture, 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
}
#include "/dimensions/skytextured.fsh"
@@ -1,43 +1,5 @@
#version 430 compatibility
#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 !!
*/
out vec4 color;
out 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.);
#define OVERWORLD_SHADER
#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
}
#include "/dimensions/skytextured.vsh"