Added resourecpack sky support. made use of iris dimensions.properties and added fallback shader.

This commit is contained in:
Xonk
2023-10-10 23:02:00 -04:00
parent 69e605b38b
commit 1168da157d
82 changed files with 738 additions and 84 deletions

View File

@ -1,5 +1,36 @@
#version 120
#include "/lib/settings.glsl"
#if RESOURCEPACK_SKY != 0
varying vec4 color;
varying vec2 texcoord;
uniform sampler2D texture;
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 ;
}
#endif
void main() {
discard;
#if RESOURCEPACK_SKY != 0
/* RENDERTARGETS:10 */
vec4 COLOR = texture2D(texture, texcoord.xy)*color;
if(renderStage == 4) COLOR.rgb *= 5.0;
// if(renderStage == 5) COLOR.rgb *= 1.5;
COLOR.rgb = max(COLOR.rgb * (0.9+0.1*interleaved_gradientNoise()), 0.0);
gl_FragData[0] = vec4(COLOR.rgb/255.0, COLOR.a);
#else
discard;
#endif
}