mirror of
https://github.com/Merlin1809/Eclipse-Shader.git
synced 2026-10-10 13:03:06 +08:00
Fix https://github.com/Merlin1809/Eclipse-Shader/issues/23 , hopefully improve AMD shader grass flickering....
This commit is contained in:
@@ -199,7 +199,9 @@ void main() {
|
||||
|
||||
int j;
|
||||
|
||||
float vertexDist = length(gl_in[0].gl_Position);
|
||||
vec3 vertex = (gl_in[0].gl_Position+gl_in[1].gl_Position+gl_in[2].gl_Position).xyz/3.0;
|
||||
|
||||
float vertexDist = length(vertex);
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
vec3 normals = viewToWorld(vFlatNormals[1]);
|
||||
@@ -230,8 +232,6 @@ void main() {
|
||||
if(vertexDist > 10.0) {triangle_count = 1; heightMult = 5.0;}
|
||||
#endif
|
||||
|
||||
vec3 vertex = (gl_in[0].gl_Position+gl_in[1].gl_Position+gl_in[2].gl_Position).xyz/3.0;
|
||||
|
||||
|
||||
float eastHeightMult = pow(clamp(abs(vgrassSideCheck[0].x) * abs(vertex.x-(vcenterPosition[0].x-0.5)), 0.0, 1.0), 2.0);
|
||||
float westHeightMult = pow(clamp(abs(vgrassSideCheck[0].y) * abs(vertex.x-(vcenterPosition[0].x+0.5)), 0.0, 1.0), 2.0);
|
||||
@@ -260,7 +260,7 @@ void main() {
|
||||
float playerDist = smoothstep(0.5, 0.05, length(offsetPos.xz)) * smoothstep(1.0, 0.2, abs(offsetPos.y));
|
||||
vec2 dir2 = normalize(vertex.xz+relativeEyePosition.xz);
|
||||
|
||||
vec2 Wvertex = gl_in[0].gl_Position.xz+cameraPosition.xz;
|
||||
vec2 Wvertex = vertex.xz+cameraPosition.xz;
|
||||
|
||||
vec2 randomDir = 2.0*(texture2D(noisetex, GRASS_NOISE1_SCALE*Wvertex).xy+texture2D(noisetex, GRASS_NOISE2_SCALE*Wvertex.yx).xy)-1.0;
|
||||
// vertex.xz -= 0.05*randomDir;
|
||||
|
||||
@@ -96,6 +96,8 @@ uniform float sunElevation;
|
||||
|
||||
#define LIGHTNINGONLY
|
||||
#include "/lib/volumetricClouds.glsl"
|
||||
#else
|
||||
uniform int worldDay;
|
||||
#endif
|
||||
|
||||
#include "/lib/waterBump.glsl"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
option.SHADER_VERSION_LABEL = §d§lECLIPSE§r - A Bliss Edit
|
||||
prefix.SHADER_VERSION_LABEL = V
|
||||
value.SHADER_VERSION_LABEL.482 = 4.2.1
|
||||
value.SHADER_VERSION_LABEL.482 = 4.2.2
|
||||
|
||||
# if you're here to translate, this is not a joke, these do what they say
|
||||
profile.POTATO=§4Potato
|
||||
@@ -1132,7 +1132,7 @@ 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
|
||||
option.WATER_WAVE_STRENGTH.comment = configure how strong the waves appear.
|
||||
option.MOONPHASE_BASED_MOONLIGHT.comment = §bWhat is this?§r every night, the moon has different lighting. This setting adjusts the moonlight brightness based on how much of the moon is glowing. §aPERFORMANCE COST:§r nearly nothing
|
||||
option.MOONPHASE_BASED_MOONLIGHT.comment = §bWhat is this?§r every night, the moon has different lighting. This setting adjusts the moonlight brightness based on how much of the moon is glowing. This setting has no effect when "Custom Moon Rotation" is enabled. §aPERFORMANCE COST:§r nearly nothing
|
||||
|
||||
option.END_STORM_DENSTIY.comment = §bWhat is this?§r This is the dark cloudy fog in the end. Confingure the density of the end storm.
|
||||
option.NETHER_PLUME_DENSITY.comment = §bWhat is this?§r This is the thick, glowing smoke towers in the nether. Confingure the density of the nether smoke.
|
||||
|
||||
@@ -973,7 +973,7 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
|
||||
#define GRASS_QUALITY 2 // [0 1 2]
|
||||
|
||||
#define GRASS_RANGE 40.0 // [10.0 12.5 15.0 17.5 20.0 22.5 25.0 27.5 30.0 32.5 35.0 37.5 40.0 42.5 45.0 47.5 50.0 60.0 70.0 80.0 90.0 100.0]
|
||||
#define GRASS_WAVY_STRENGTH 1.0 // [0.1 0.25 0.5 0.75 1.0 1.25 1.5 1.75 2.0]
|
||||
#define GRASS_WAVY_STRENGTH 1.0 // [0.0 0.1 0.25 0.5 0.75 1.0 1.25 1.5 1.75 2.0]
|
||||
|
||||
#define GRASS_RANDOMNESS 0.5 // [0.0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1.0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user