mirror of
https://github.com/Merlin1809/Eclipse-Shader.git
synced 2026-10-11 17:58:20 +08:00
fix compile error in end
This commit is contained in:
1 parent
feb0a0a749
commit
2e0a04dd97
14 files changed
+38
-47
No files matched your search
@@ -62,7 +62,6 @@ vec4 toClipSpace3(vec3 viewSpacePosition) {
|
||||
#ifdef LINES
|
||||
uniform int currentSelectedBlockId;
|
||||
uniform int renderStage;
|
||||
uniform vec3 currentSelectedBlockPos;
|
||||
|
||||
#include "/lib/blocks.glsl"
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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<spCount;i++) {
|
||||
float d = (pow(expFactor, float(i+dither.x)/float(spCount))/expFactor - 1.0/expFactor)/(1-1.0/expFactor); // exponential step position (0-1)
|
||||
float dd = pow(expFactor, float(i+dither.y)/float(spCount)) * log(expFactor) / float(spCount)/(expFactor-1.0); //step length (derivative)
|
||||
@@ -407,7 +407,6 @@ vec4 waterVolumetrics(vec3 rayStart, vec3 rayEnd, float rayLength, vec2 dither,
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
float bubble = exp2(-10.0 * clamp(1.0 - length(d*dVWorld) / 16.0, 0.0,1.0));
|
||||
float caustics = max(max(waterCaustics(progressW, WsunVec, -(progressW.y - waterEnteredAltitude)), phase*0.5) * mix(0.5, 1.5, bubble), phase);
|
||||
|
||||
@@ -736,11 +735,10 @@ void main() {
|
||||
vec3 playerPos = mat3(gbufferModelViewInverse) * viewPos0 + gbufferModelViewInverse[3].xyz;
|
||||
vec3 playerPos_normalized = normalize(playerPos);
|
||||
|
||||
float dirtAmount = Dirt_Amount;
|
||||
// vec3 waterEpsilon = vec3(Water_Absorb_R, Water_Absorb_G, Water_Absorb_B);
|
||||
// vec3 dirtEpsilon = vec3(Dirt_Absorb_R, Dirt_Absorb_G, Dirt_Absorb_B);
|
||||
vec3 totEpsilon = vec3(Water_Absorb_R, Water_Absorb_G, Water_Absorb_B);
|
||||
vec3 scatterCoef = dirtAmount * vec3(Dirt_Scatter_R, Dirt_Scatter_G, Dirt_Scatter_B) / 3.14;
|
||||
vec3 scatterCoef = Dirt_Amount * vec3(Dirt_Scatter_R, Dirt_Scatter_G, Dirt_Scatter_B) / 3.14;
|
||||
|
||||
vec3 directLightColor = lightSourceColorSSBO / 2400.0;
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ screen.Foliage = Foliage
|
||||
option.WAVY_STRENGTH = Waving Strength
|
||||
option.WAVY_SPEED = Waving Speed
|
||||
|
||||
option.SHADER_GRASS = Shader Grass §c(Iris 1.7+)
|
||||
option.SHADER_GRASS = Shader Grass §c(1.21.1+)
|
||||
option.GRASS_BASE_THICKNESS = Grass Blade Base Thickness
|
||||
option.GRASS_THICKNESS_FALLOFF = Grass Thickness Falloff
|
||||
option.GRASS_THICKNESS_FALLOFF.comment = Controls how quickly each blade of grass becomes narrower. At 1.0 it will stay the same thickness until the tip
|
||||
|
||||
@@ -1219,14 +1219,13 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
|
||||
#undef CUSTOM_MOON_ROTATION
|
||||
#define LIGHTNING_SHADOWS 0
|
||||
#undef END_ISLAND_LIGHT
|
||||
#if WATER_INTERACTION == 2
|
||||
#if WATER_INTERACTION == 2 && IRIS_VERSION < 11004
|
||||
#define WATER_INTERACTION 1
|
||||
#endif
|
||||
#undef SHADER_GRASS
|
||||
#endif
|
||||
|
||||
// only iris 1.7+ allows tessellation
|
||||
#ifndef IRIS_FEATURE_TESSELLATION_SHADERS
|
||||
#if MC_VERSION < 12101
|
||||
#undef SHADER_GRASS
|
||||
#endif
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ void PopulateShadowVoxel(const in vec3 playerPos) {
|
||||
((renderStage == MC_RENDER_STAGE_ENTITIES && (currentRenderedItemId > 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
|
||||
|
||||
@@ -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++){
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user