diff --git a/shaders/dimensions/all_particles.vsh b/shaders/dimensions/all_particles.vsh index f428c9f..523d854 100644 --- a/shaders/dimensions/all_particles.vsh +++ b/shaders/dimensions/all_particles.vsh @@ -62,7 +62,6 @@ vec4 toClipSpace3(vec3 viewSpacePosition) { #ifdef LINES uniform int currentSelectedBlockId; uniform int renderStage; - uniform vec3 currentSelectedBlockPos; #include "/lib/blocks.glsl" diff --git a/shaders/dimensions/all_solid.vsh b/shaders/dimensions/all_solid.vsh index 850eea9..6b79544 100644 --- a/shaders/dimensions/all_solid.vsh +++ b/shaders/dimensions/all_solid.vsh @@ -381,7 +381,7 @@ void main() { (InterpolateFromBase && (mc_Entity.x == BLOCK_GRASS_TALL_LOWER || mc_Entity.x == BLOCK_GROUND_WAVING || mc_Entity.x == BLOCK_GRASS_SHORT || mc_Entity.x == BLOCK_SAPLING || mc_Entity.x == BLOCK_GROUND_WAVING_VERTICAL)) // these wave off of the ceiling. the area connected to the ceiling does not wave. - || (!InterpolateFromBase && (mc_Entity.x == 17)) + || (!InterpolateFromBase && (mc_Entity.x == BLOCK_VINE_OTHER)) // these wave off of the air. they wave uniformly || (mc_Entity.x == BLOCK_GRASS_TALL_UPPER || mc_Entity.x == BLOCK_AIR_WAVING) diff --git a/shaders/dimensions/all_translucent.fsh b/shaders/dimensions/all_translucent.fsh index c40de11..40a6a00 100644 --- a/shaders/dimensions/all_translucent.fsh +++ b/shaders/dimensions/all_translucent.fsh @@ -149,7 +149,7 @@ uniform float waterEnteredAltitude; #if WATER_INTERACTION == 2 #ifdef PIXELATED_WAVES - layout (rgba16f) uniform image2D waveSim2; + layout (rgba16f) uniform readonly image2D waveSim2; #else uniform sampler2D waveSim2Sampler; #endif diff --git a/shaders/dimensions/composite1.fsh b/shaders/dimensions/composite1.fsh index f7b907e..420175d 100644 --- a/shaders/dimensions/composite1.fsh +++ b/shaders/dimensions/composite1.fsh @@ -19,7 +19,7 @@ #include "/lib/res_params.glsl" #define diagonal3_old(m) vec3((m)[0].x, (m)[1].y, m[2].z) -#define projMAD_old(m, v) (diagonal3_old(m) * (v) + (m)[3].xyz) +#define projMAD_old(m, v) (diagonal3_old(m) * (v) + (m)[3].xyz) const bool colortex5MipmapEnabled = true; uniform float nightVision; diff --git a/shaders/dimensions/composite2.fsh b/shaders/dimensions/composite2.fsh index f7f74a5..fcf865d 100644 --- a/shaders/dimensions/composite2.fsh +++ b/shaders/dimensions/composite2.fsh @@ -365,7 +365,7 @@ vec4 waterVolumetrics(vec3 rayStart, vec3 rayEnd, float rayLength, vec2 dither, thing = pow(1.0-pow(1.0-thing,2.0),2.0); thing *= 15.0; - float expFactor = 11.0; + const float expFactor = 11.0; for (int i=0;i 0 || entityId > 0)) || renderStage == MC_RENDER_STAGE_BLOCK_ENTITIES) ) { if (renderStage == MC_RENDER_STAGE_BLOCK_ENTITIES) { - if (blockEntityId > 0 && blockEntityId < 500) + if (blockEntityId > 0 && blockEntityId < 500 && blockEntityId != BLOCK_ENCHANTING_TABLE) voxelId = uint(blockEntityId); } else if (currentRenderedItemId > 100 && currentRenderedItemId < 300) { @@ -66,7 +66,7 @@ void PopulateShadowVoxel(const in vec3 playerPos) { { voxelId = uint(currentRenderedItemId); - // offset by a random number that came into my head to make entities and items not interact with grass + // offset by a random number that came into my head to make entities and items not interact with shader grass voxelId += 2000u; #if defined SHADER_GRASS && REPLACE_SHORT_GRASS < 2 diff --git a/shaders/lib/waterBump.glsl b/shaders/lib/waterBump.glsl index 38c5621..4600fe5 100644 --- a/shaders/lib/waterBump.glsl +++ b/shaders/lib/waterBump.glsl @@ -1,3 +1,11 @@ +const vec2 wave_size[3] = vec2[]( + vec2(48.,12.), + vec2(12.,48.), + vec2(32.,32.) +); + +const float radiance = 2.39996; + float waterCaustics(vec3 worldPos, vec3 sunVec, float surfacePos) { vec3 projectedPos = worldPos + (sunVec/abs(sunVec.y))*surfacePos; @@ -5,15 +13,8 @@ float waterCaustics(vec3 worldPos, vec3 sunVec, float surfacePos) { float movement = frameTimeCounter * 0.035 * WATER_WAVE_SPEED; - float radiance = 2.39996; mat2 rotationMatrix = mat2(vec2(cos(radiance), -sin(radiance)), vec2(sin(radiance), cos(radiance))); - vec2 wave_size[3] = vec2[]( - vec2(48.,12.), - vec2(12.,48.), - vec2(32.,32.) - ); - float largeWaves = texture(noisetex, pos / 600.0 ).b; float largeWavesCurved = pow(1.0-pow(1.0-largeWaves,2.5),4.5); @@ -32,16 +33,8 @@ float getWaterHeightmap(vec2 posxz, in float largeWaves, in float largeWavesCurv float movement = frameTimeCounter * 0.035 * WATER_WAVE_SPEED; - float radiance = 2.39996; mat2 rotationMatrix = mat2(vec2(cos(radiance), -sin(radiance)), vec2(sin(radiance), cos(radiance))); - vec2 wave_size[3] = vec2[]( - vec2(48.,12.), - vec2(12.,48.), - vec2(32.,32.) - ); - - float heightSum = 0.0; for (int i = 0; i < 3; i++){ diff --git a/shaders/shaders.properties b/shaders/shaders.properties index 970bf71..a53481a 100644 --- a/shaders/shaders.properties +++ b/shaders/shaders.properties @@ -29,7 +29,9 @@ beacon.beam.depth = true sky = false stars = false -iris.features.optional = ENTITY_TRANSLUCENT REVERSED_CULLING COMPUTE_SHADERS CUSTOM_IMAGES BLOCK_EMISSION_ATTRIBUTE SSBO TESSELLATION_SHADERS FADE_VARIABLE TEXTURE_FILTERING +iris.features.required = SSBO + +iris.features.optional = ENTITY_TRANSLUCENT REVERSED_CULLING COMPUTE_SHADERS CUSTOM_IMAGES BLOCK_EMISSION_ATTRIBUTE TESSELLATION_SHADERS FADE_VARIABLE TEXTURE_FILTERING #ifdef REALMOON customTexture.moon = texture/moon.png @@ -633,7 +635,7 @@ variable.int.BiomeTransitionTime = 60 #ifdef SNOW_STORMS uniform.float.snowStorm = smooth(if(in(biome_category, CAT_ICY), rainStrength, 0), 15, 30) #else - uniform.float.snowStorm = 0.0; + uniform.float.snowStorm = 0.0 #endif #ifdef SAND_STORMS @@ -643,7 +645,7 @@ variable.int.BiomeTransitionTime = 60 uniform.float.sandStorm = smooth(if(in(biome_category, CAT_DESERT, CAT_MESA), rainStrength, 0), 15, 30) #endif #else - uniform.float.sandStorm = 0.0; + uniform.float.sandStorm = 0.0 #endif uniform.float.noPuddleAreas = smooth(if(biome_precipitation != 1, 0,1), 15, 15) @@ -944,7 +946,7 @@ uniform.int.dhVoxyRenderDistance = dhRenderDistance ####### FLOODFILL STUFF ####### ############################### -#if defined LPV_ENABLED || WATER_INTERACTION == 2 || (defined SHADER_GRASS && (defined GRASS_DETECT_FALLOFF || defined GRASS_DETECT_INV_FALLOFF || REPLACE_SHORT_GRASS > 0)) +#if defined LPV_ENABLED || (WATER_INTERACTION == 2 && IRIS_VERSION < 11004) || (defined SHADER_GRASS && (defined GRASS_DETECT_FALLOFF || defined GRASS_DETECT_INV_FALLOFF || REPLACE_SHORT_GRASS > 0)) image.imgBlockData = texBlockData RG_INTEGER RG32UI UNSIGNED_INT false false 2048 #if LPV_SIZE == 8 && (defined LPV_ENABLED || (defined SHADER_GRASS && (defined GRASS_DETECT_FALLOFF || defined GRASS_DETECT_INV_FALLOFF || REPLACE_SHORT_GRASS > 0))) @@ -959,7 +961,7 @@ uniform.int.dhVoxyRenderDistance = dhRenderDistance image.imgVoxelMask = none RED_INTEGER R16UI UNSIGNED_SHORT true false 64 64 64 image.imgLpv1 = texLpv1 RGB RGBA8 BYTE false false 64 64 64 image.imgLpv2 = texLpv2 RGB RGBA8 BYTE false false 64 64 64 - #elif WATER_INTERACTION == 2 + #elif WATER_INTERACTION == 2 && IRIS_VERSION < 11004 image.imgVoxelMask = none RED_INTEGER R16UI UNSIGNED_SHORT true false 5 5 5 program.world1/shadowcomp.enabled = false program.world0/shadowcomp.enabled = false diff --git a/shaders/world0/shadow.vsh b/shaders/world0/shadow.vsh index ab4f35d..9e9f26e 100644 --- a/shaders/world0/shadow.vsh +++ b/shaders/world0/shadow.vsh @@ -3,7 +3,7 @@ #include "/lib/settings.glsl" -#if defined IS_LPV_ENABLED || WATER_INTERACTION == 2 || defined SHADER_GRASS +#if defined IS_LPV_ENABLED || (WATER_INTERACTION == 2 && IRIS_VERSION < 11004) || defined SHADER_GRASS #extension GL_ARB_explicit_attrib_location: enable #extension GL_ARB_shader_image_load_store: enable #endif @@ -63,7 +63,7 @@ uniform int entityId; #include "/lib/blocks.glsl" #include "/lib/entities.glsl" -#if defined IS_LPV_ENABLED || WATER_INTERACTION == 2 || defined SHADER_GRASS +#if defined IS_LPV_ENABLED || (WATER_INTERACTION == 2 && IRIS_VERSION < 11004) || defined SHADER_GRASS #ifdef IRIS_FEATURE_BLOCK_EMISSION_ATTRIBUTE in vec4 at_midBlock; #else @@ -214,7 +214,7 @@ void main() { playerpos = mat3(shadowModelViewInverse) * position + shadowModelViewInverse[3].xyz; // #endif - #if defined IS_LPV_ENABLED && defined MC_GL_ARB_shader_image_load_store || WATER_INTERACTION == 2 || defined SHADER_GRASS + #if defined IS_LPV_ENABLED && defined MC_GL_ARB_shader_image_load_store || (WATER_INTERACTION == 2 && IRIS_VERSION < 11004) || defined SHADER_GRASS PopulateShadowVoxel(playerpos); #endif diff --git a/shaders/world0_with_aether_flag/shadow.vsh b/shaders/world0_with_aether_flag/shadow.vsh index a8db746..09d434d 100644 --- a/shaders/world0_with_aether_flag/shadow.vsh +++ b/shaders/world0_with_aether_flag/shadow.vsh @@ -3,7 +3,7 @@ #include "/lib/settings.glsl" -#if defined IS_LPV_ENABLED || WATER_INTERACTION == 2 || defined SHADER_GRASS +#if defined IS_LPV_ENABLED || (WATER_INTERACTION == 2 && IRIS_VERSION < 11004) || defined SHADER_GRASS #extension GL_ARB_explicit_attrib_location: enable #extension GL_ARB_shader_image_load_store: enable #endif @@ -60,7 +60,7 @@ uniform int entityId; #include "/lib/blocks.glsl" #include "/lib/entities.glsl" -#if defined IS_LPV_ENABLED || WATER_INTERACTION == 2 || defined SHADER_GRASS +#if defined IS_LPV_ENABLED || (WATER_INTERACTION == 2 && IRIS_VERSION < 11004) || defined SHADER_GRASS #ifdef IRIS_FEATURE_BLOCK_EMISSION_ATTRIBUTE in vec4 at_midBlock; #else @@ -211,7 +211,7 @@ void main() { vec3 playerpos = mat3(shadowModelViewInverse) * position + shadowModelViewInverse[3].xyz; // #endif - #if defined IS_LPV_ENABLED && defined MC_GL_ARB_shader_image_load_store || WATER_INTERACTION == 2 || defined SHADER_GRASS + #if defined IS_LPV_ENABLED && defined MC_GL_ARB_shader_image_load_store || (WATER_INTERACTION == 2 && IRIS_VERSION < 11004) || defined SHADER_GRASS PopulateShadowVoxel(playerpos); #endif diff --git a/shaders/world0_with_twilight_forest_flag/shadow.vsh b/shaders/world0_with_twilight_forest_flag/shadow.vsh index 7cea6c3..c3998e8 100644 --- a/shaders/world0_with_twilight_forest_flag/shadow.vsh +++ b/shaders/world0_with_twilight_forest_flag/shadow.vsh @@ -3,7 +3,7 @@ #include "/lib/settings.glsl" -#if defined IS_LPV_ENABLED || WATER_INTERACTION == 2 || defined SHADER_GRASS +#if defined IS_LPV_ENABLED || (WATER_INTERACTION == 2 && IRIS_VERSION < 11004) || defined SHADER_GRASS #extension GL_ARB_explicit_attrib_location: enable #extension GL_ARB_shader_image_load_store: enable #endif @@ -59,7 +59,7 @@ uniform int entityId; #include "/lib/blocks.glsl" #include "/lib/entities.glsl" -#if defined IS_LPV_ENABLED || WATER_INTERACTION == 2 || defined SHADER_GRASS +#if defined IS_LPV_ENABLED || (WATER_INTERACTION == 2 && IRIS_VERSION < 11004) || defined SHADER_GRASS #ifdef IRIS_FEATURE_BLOCK_EMISSION_ATTRIBUTE in vec4 at_midBlock; #else @@ -210,7 +210,7 @@ void main() { vec3 playerpos = mat3(shadowModelViewInverse) * position + shadowModelViewInverse[3].xyz; // #endif - #if defined IS_LPV_ENABLED && defined MC_GL_ARB_shader_image_load_store || WATER_INTERACTION == 2 || defined SHADER_GRASS + #if defined IS_LPV_ENABLED && defined MC_GL_ARB_shader_image_load_store || (WATER_INTERACTION == 2 && IRIS_VERSION < 11004) || defined SHADER_GRASS PopulateShadowVoxel(playerpos); #endif diff --git a/shaders/world1/shadow.vsh b/shaders/world1/shadow.vsh index 3a73070..7712bbb 100644 --- a/shaders/world1/shadow.vsh +++ b/shaders/world1/shadow.vsh @@ -23,7 +23,7 @@ out DATA { vec2 texcoord; }; -#if defined IS_LPV_ENABLED || defined END_ISLAND_LIGHT || WATER_INTERACTION == 2 || defined SHADER_GRASS +#if defined IS_LPV_ENABLED || defined END_ISLAND_LIGHT || (WATER_INTERACTION == 2 && IRIS_VERSION < 11004) || defined SHADER_GRASS uniform int renderStage; uniform mat4 shadowModelViewInverse; uniform int entityId; @@ -31,7 +31,7 @@ out DATA { #include "/lib/entities.glsl" #endif -#if defined IS_LPV_ENABLED || WATER_INTERACTION == 2 || defined SHADER_GRASS +#if defined IS_LPV_ENABLED || (WATER_INTERACTION == 2 && IRIS_VERSION < 11004) || defined SHADER_GRASS in vec4 mc_Entity; #ifdef IRIS_FEATURE_BLOCK_EMISSION_ATTRIBUTE in vec4 at_midBlock; @@ -58,12 +58,12 @@ out DATA { void main() { - #if defined END_ISLAND_LIGHT || (defined IS_LPV_ENABLED && defined MC_GL_ARB_shader_image_load_store) + #if defined END_ISLAND_LIGHT || (defined IS_LPV_ENABLED && defined MC_GL_ARB_shader_image_load_store) || (WATER_INTERACTION == 2 && IRIS_VERSION < 11004) || defined SHADER_GRASS vec3 shadowViewPos = mat3(gl_ModelViewMatrix) * vec3(gl_Vertex) + gl_ModelViewMatrix[3].xyz; vec3 feetPlayerPos = mat3(shadowModelViewInverse) * shadowViewPos + shadowModelViewInverse[3].xyz; #endif - #if defined IS_LPV_ENABLED && defined MC_GL_ARB_shader_image_load_store || WATER_INTERACTION == 2 || defined SHADER_GRASS + #if (defined IS_LPV_ENABLED && defined MC_GL_ARB_shader_image_load_store) || (WATER_INTERACTION == 2 && IRIS_VERSION < 11004) || defined SHADER_GRASS #ifdef LPV_NOSHADOW_HACK vec3 playerpos = gl_Vertex.xyz; #else