mirror of
https://github.com/Merlin1809/Eclipse-Shader.git
synced 2026-10-10 04:53:07 +08:00
add DH texture support, add physics mod ocean v3 support
This commit is contained in:
@@ -162,7 +162,7 @@ block.56=minecraft:pale_hanging_moss minecraft:azalea_leaves minecraft:flowering
|
||||
conquest:cypress conquest:young_tree conquest:young_frozen_tree conquest:sweet_grass conquest:cow_parsley conquest:rosebay_willowherb conquest:alpine_sow_thistle conquest:nettles conquest:cattails conquest:rushes conquest:dead_reeds conquest:dry_reeds conquest:greater_fen_sedge conquest:papyrus conquest:white_clematis conquest:angelica conquest:heirloom_wheat_crops conquest:corn conquest:hemp \
|
||||
#conquest connected texture plants two meters or tall state
|
||||
conquest:meadow_fescue conquest:cut_wheat_shafts conquest:green_meadow_fescue conquest:wavy_hair_grass conquest:dooryard_dock conquest:large_fern_1 conquest:large_fern_2 conquest:large_fern_3 conquest:melancholy_thistle conquest:allium conquest:tall_grass_utility \
|
||||
dynamictrees:oak_undergrowth_leaves dynamictrees:azalea_leaves dynamictrees:acacia_leaves dynamictrees:bamboo_leaves dynamictrees:birch_leaves dynamictrees:cherry_leaves dynamictrees:crimson_leaves dynamictrees:dark_oak_leaves dynamictrees:jungle_leaves dynamictrees:mangrove_leaves dynamictrees:oak_leaves dynamictrees:pale_oak_leaves dynamictrees:spruce_leaves dynamictrees:warped_leaves \
|
||||
dynamictrees:oak_undergrowth_leaves dynamictrees:azalea_leaves dynamictrees:flowering_azalea_leaves dynamictrees:acacia_leaves dynamictrees:bamboo_leaves dynamictrees:birch_leaves dynamictrees:cherry_leaves dynamictrees:crimson_leaves dynamictrees:dark_oak_leaves dynamictrees:jungle_leaves dynamictrees:mangrove_leaves dynamictrees:oak_leaves dynamictrees:pale_oak_leaves dynamictrees:spruce_leaves dynamictrees:warped_leaves \
|
||||
flying_stuff:fiery_leaves flying_stuff:lavic_fungus_block \
|
||||
garnished:walnut_leaves garnished:almond_leaves garnished:pecan_leaves garnished:pistachio_leaves garnished:macadamia_leaves garnished:peanut_leaves garnished:hazelnut_leaves garnished:chestnut_leaves garnished:nut_leaves garnished:unassigned_nut_leaves garnished:cashew_leaves \
|
||||
mariposa:sequoia_leaves \
|
||||
|
||||
@@ -199,11 +199,19 @@ void main() {
|
||||
vec4 data1 = clamp( encode(normals, PackLightmaps), 0.0, 1.0);
|
||||
|
||||
// alpha is material masks, set it to 0.65 to make a DH LODs mask.
|
||||
#ifdef DH_NOISE_TEXTURE
|
||||
#if defined DH_NOISE_TEXTURE && !defined DISTANT_HORIZONS_TEXTURES
|
||||
vec4 Albedo = applyNoise(gcolor, viewDist);
|
||||
#else
|
||||
vec4 Albedo = vec4(gcolor.rgb, 1.0);
|
||||
#endif
|
||||
|
||||
#ifdef DISTANT_HORIZONS_TEXTURES
|
||||
if (dh_hasTexture()) {
|
||||
vec4 that = dh_sampleTexture();
|
||||
vec3 clampedColor = clamp(Albedo.rgb * (that.rgb * 2.0), 0.0, 1.0);
|
||||
Albedo.rgb = mix(Albedo.rgb, clampedColor, that.a);
|
||||
}
|
||||
#endif
|
||||
// vec3 worldPos = mat3(gbufferModelViewInverse)*pos.xyz + cameraPosition;
|
||||
// worldPos = (worldPos*vec3(1.0,1./48.,1.0)/4) ;
|
||||
// worldPos = floor(worldPos * 4.0 + 0.001) / 32.0;
|
||||
|
||||
@@ -336,6 +336,15 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
|
||||
|
||||
gl_FragData[0] = gcolor;
|
||||
|
||||
#ifdef DISTANT_HORIZONS_TEXTURES
|
||||
if (dh_hasTexture()) {
|
||||
vec4 that = dh_sampleTexture();
|
||||
vec3 clampedColor = clamp(gl_FragData[0].rgb * (that.rgb * 2.0), 0.0, 1.0);
|
||||
gl_FragData[0].rgb = mix(gl_FragData[0].rgb, clampedColor, that.a);
|
||||
}
|
||||
#endif
|
||||
|
||||
float UnchangedAlpha = gl_FragData[0].a;
|
||||
|
||||
#ifdef WhiteWorld
|
||||
|
||||
@@ -90,6 +90,9 @@ uniform float viewWidth;
|
||||
uniform int hideGUI;
|
||||
uniform float screenBrightness;
|
||||
uniform int isEyeInWater;
|
||||
uniform float rainStrength;
|
||||
uniform int worldTime;
|
||||
uniform vec3 previousCameraPosition;
|
||||
|
||||
// in vec3 at_velocity;
|
||||
// out vec3 velocity;
|
||||
@@ -103,7 +106,6 @@ uniform vec2 texelSize;
|
||||
|
||||
#if defined HAND
|
||||
uniform mat4 gbufferPreviousModelView;
|
||||
uniform vec3 previousCameraPosition;
|
||||
|
||||
float detectCameraMovement(){
|
||||
// simply get the difference of modelview matrices and cameraPosition across a frame.
|
||||
|
||||
@@ -306,7 +306,7 @@ vec3 applyBump(mat3 tbnMatrix, vec3 bump, float mult, vec3 rippleBump){
|
||||
float bumpmult = mult;
|
||||
bump = bump * bumpmult + vec3(0.0f, 0.0f, 1.0f - bumpmult);
|
||||
|
||||
#if (defined PHYSICSMOD_OCEAN_SHADER && defined PHYSICS_OCEAN || defined PHYSICSMOD_OCEAN_SHADER_V2)
|
||||
#if (defined PHYSICSMOD_OCEAN_SHADER && defined PHYSICS_OCEAN || defined PHYSICSMOD_OCEAN_SHADER_V2 || defined PHYSICS_OCEAN_V3)
|
||||
bump += 4.0 * rippleBump;
|
||||
#endif
|
||||
|
||||
@@ -737,8 +737,19 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
vec3 normal = normalMat.xyz; // in viewSpace
|
||||
vec3 geoNormals = viewToWorld(normal).xyz; // for refractions
|
||||
|
||||
#if (defined PHYSICSMOD_OCEAN_SHADER && defined PHYSICS_OCEAN || defined PHYSICSMOD_OCEAN_SHADER_V2)
|
||||
WavePixelData wave = physics_wavePixel(physics_localPosition.xz, physics_localWaviness, physics_iterationsNormal, physics_gameTime);
|
||||
#if (defined PHYSICSMOD_OCEAN_SHADER && defined PHYSICS_OCEAN || defined PHYSICSMOD_OCEAN_SHADER_V2 || defined PHYSICS_OCEAN_V3)
|
||||
vec3 waveNormal;
|
||||
float waveFoam;
|
||||
#ifdef PHYSICS_OCEAN_V3
|
||||
PhysicsOceanData ocean = physics_oceanFragment();
|
||||
waveNormal = ocean.normal;
|
||||
waveFoam = ocean.foam;
|
||||
#else
|
||||
WavePixelData wave = physics_wavePixel(physics_localPosition.xz, physics_localWaviness, physics_iterationsNormal, physics_gameTime);
|
||||
waveNormal = wave.normal;
|
||||
waveFoam = wave.foam;
|
||||
#endif
|
||||
|
||||
float physics_localWaviness_fade = smoothstep(0.0, 0.1, physics_localWaviness);
|
||||
|
||||
#if defined DISTANT_HORIZONS || defined VOXY
|
||||
@@ -751,20 +762,20 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
vec3 nMat = normalMat.xyz;
|
||||
|
||||
if (!gl_FrontFacing) {
|
||||
wave.normal = -wave.normal;
|
||||
waveNormal = -waveNormal;
|
||||
nMat = -nMat;
|
||||
}
|
||||
|
||||
normal = mix(normalize(gl_NormalMatrix * wave.normal), normal, PHYSICS_OCEAN_TRANSITION);
|
||||
normal = mix(normalize(gl_NormalMatrix * waveNormal), normal, PHYSICS_OCEAN_TRANSITION);
|
||||
normal = mix(nMat, normal, physics_localWaviness_fade);
|
||||
Albedo = mix(Albedo, vec3(1.0), wave.foam);
|
||||
gl_FragData[0].a = mix(1.0/255.0, 1.0, wave.foam);
|
||||
Albedo = mix(Albedo, vec3(1.0), waveFoam);
|
||||
gl_FragData[0].a = mix(1.0/255.0, 1.0, waveFoam);
|
||||
}
|
||||
#endif
|
||||
|
||||
vec3 worldSpaceNormal = viewToWorld(normal).xyz;
|
||||
|
||||
#if defined LARGE_WAVE_DISPLACEMENT && !defined PHYSICS_OCEAN && !defined PHYSICSMOD_OCEAN_SHADER_V2
|
||||
#if defined LARGE_WAVE_DISPLACEMENT && !defined PHYSICS_OCEAN && !defined PHYSICSMOD_OCEAN_SHADER_V2 && !defined PHYSICS_OCEAN_V3
|
||||
if (isWater){
|
||||
normal = largeWaveDisplacementNormal;
|
||||
}
|
||||
@@ -882,7 +893,7 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
// tangent space normals for refraction
|
||||
vec2 TangentNormal = NormalTex.xy;
|
||||
|
||||
#if (defined PHYSICSMOD_OCEAN_SHADER && defined PHYSICS_OCEAN || defined PHYSICSMOD_OCEAN_SHADER_V2)
|
||||
#if (defined PHYSICSMOD_OCEAN_SHADER && defined PHYSICS_OCEAN || defined PHYSICSMOD_OCEAN_SHADER_V2 || defined PHYSICS_OCEAN_V3)
|
||||
rippleBump *= physics_localWaviness;
|
||||
float bumpmult = mix(isWater ? 1.0 : NORMAL_MAP_MULT, isWater ? PHYSICS_OCEAN_TRANSITION : NORMAL_MAP_MULT, physics_localWaviness_fade);
|
||||
|
||||
@@ -893,8 +904,8 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
|
||||
worldSpaceNormal = viewToWorld(normal);
|
||||
|
||||
#if (defined PHYSICSMOD_OCEAN_SHADER && defined PHYSICS_OCEAN || defined PHYSICSMOD_OCEAN_SHADER_V2)
|
||||
if (isWater) TangentNormal = mix(NormalTex.xy, normalize(wave.normal).xz, physics_localWaviness_fade);
|
||||
#if (defined PHYSICSMOD_OCEAN_SHADER && defined PHYSICS_OCEAN || defined PHYSICSMOD_OCEAN_SHADER_V2 || defined PHYSICS_OCEAN_V3)
|
||||
if (isWater) TangentNormal = mix(NormalTex.xy, normalize(waveNormal).xz, physics_localWaviness_fade);
|
||||
#endif
|
||||
|
||||
gl_FragData[2].r = encodeVec2(TangentNormal*0.5+0.5);
|
||||
|
||||
@@ -151,7 +151,10 @@ void main() {
|
||||
|
||||
bool isWater = mc_Entity.x == 8.0;
|
||||
|
||||
#if defined PHYSICSMOD_OCEAN_SHADER && defined PHYSICS_OCEAN
|
||||
#ifdef PHYSICS_OCEAN_V3
|
||||
vec4 finalPosition = physics_oceanVertex(gl_Vertex);
|
||||
vec3 position = mat3(gl_ModelViewMatrix) * vec3(finalPosition) + gl_ModelViewMatrix[3].xyz;
|
||||
#elif defined PHYSICSMOD_OCEAN_SHADER && defined PHYSICS_OCEAN
|
||||
// basic texture to determine how shallow/far away from the shore the water is
|
||||
physics_localWaviness = texelFetch(physics_waviness, ivec2(gl_Vertex.xz) - physics_textureOffset, 0).r;
|
||||
// transform gl_Vertex (since it is the raw mesh, i.e. not transformed yet)
|
||||
|
||||
@@ -110,10 +110,11 @@ void main() {
|
||||
int blocks = int(yEnd - yStart - 0.5);
|
||||
vec4 vcolor = data_in[bottomIndex].color;
|
||||
vec3 color = vcolor.rgb * vcolor.rgb;
|
||||
int packedColor = packColor(color);
|
||||
|
||||
int j;
|
||||
for (j = 0; j < blocks; j++) {
|
||||
SetVoxelBlock(voxelPos, packColor(color));
|
||||
SetVoxelBlock(voxelPos, packedColor);
|
||||
voxelPos.y += 1;
|
||||
if(voxelPos.y > int(VoxelSize) - 1) break;
|
||||
}
|
||||
@@ -125,17 +126,15 @@ void main() {
|
||||
|
||||
int i;
|
||||
for (i = 0; i < 3; i++) {
|
||||
vec4 vertex = gl_in[i].gl_Position;
|
||||
vec3 vertex = gl_in[i].gl_Position.xyz;
|
||||
|
||||
data_out.color = data_in[i].color;
|
||||
|
||||
data_out.texcoord = data_in[i].texcoord;
|
||||
|
||||
gl_Position = vertex;
|
||||
vertex = mat3(gbufferModelView) * vertex + gbufferModelView[3].xyz;
|
||||
|
||||
vertex.rgb = mat3(gbufferModelView) * vertex.rgb + gbufferModelView[3].xyz;
|
||||
|
||||
gl_Position = toClipSpace3(vertex.rgb);
|
||||
gl_Position = toClipSpace3(vertex);
|
||||
|
||||
|
||||
if(data_in[i].color.a < 1.0) gl_Position = vec4(10,10,10,0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
option.SHADER_VERSION_LABEL = §d§lECLIPSE§r - A Bliss Edit
|
||||
prefix.SHADER_VERSION_LABEL = V
|
||||
value.SHADER_VERSION_LABEL.482 = 8.4.0
|
||||
value.SHADER_VERSION_LABEL.482 = 8.5.0
|
||||
|
||||
iris_extension.keybind.key0.name=Flashlight
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
option.SHADER_VERSION_LABEL = §d§lECLIPSE§r - Bliss 编辑版
|
||||
prefix.SHADER_VERSION_LABEL = 版本
|
||||
value.SHADER_VERSION_LABEL.482 = 8.4.0
|
||||
value.SHADER_VERSION_LABEL.482 = 8.5.0
|
||||
|
||||
# 如果你是来翻译的,这不是玩笑,这些选项的功能正如其名
|
||||
profile.POTATO=§4土豆 (极低配置)
|
||||
|
||||
@@ -1123,7 +1123,7 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
|
||||
#define LPV_NORMAL_OFFSET
|
||||
#define LPV_ENTITY_LIGHTS
|
||||
#define BEACON_FLOODFILL
|
||||
#define BEACON_FLOODFILL_BRIGHTNESS 100 // [1 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 125 130 135 140 145 150 155 160 165 170 175 180 185 190 195 200]
|
||||
#define BEACON_FLOODFILL_BRIGHTNESS 100 // [1 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 125 130 135 140 145 150 155 160 165 170 175 180 185 190 195 200 250 300 350 400 450 500 600 700 800 900 1000 1250 1500 1750 2000 2500 3000]
|
||||
#define LPV_REDSTONE_LIGHTS
|
||||
//#define LPV_COLORED_CANDLES
|
||||
#define LPV_VL_FOG_ILLUMINATION
|
||||
|
||||
Reference in New Issue
Block a user