请阅读。
这是一款专为极低配置电脑设计的轻量级光影包,它包含摇曳的树叶、流动的水面、平滑的光照以及平滑的水面效果。下界和末地的光照效果良好,宝石矿石(红石、钻石、青金石、金)会像红石一样发光。其他物品不会发光,因为我是通过颜色而非方块 ID 来实现的,所以任何带有类似宝石颜色的物体都会发光……你还会看到周围有一圈白色的墙壁状物体,这也是一个问题,我尝试过修复但效果不佳……水下视野清晰可见,但距离不远,同时也包含阴影效果……你可能会发现末影人和蜘蛛没有眼睛,纹理出现了一些故障,我也尝试修复过,但情况变得更糟了,不过请始终记住不要直视末影人。草地也是波浪形的,因此问题在于其边缘漏光,当草摆动时会被撕裂,导致在角落处可以看到内部……没有复杂的云层或阳光效果……你可以透过岩浆看到下方……我不是模组开发者或程序员,但我希望你能够喜欢它……如果你恰好是程序员,修复这些问题并不难……我会尽量留下代码……我制作它是出于我自己的电脑配置考虑,因为那真的是一台毫无前途的“土豆”电脑……而且它完全由 Gemini 生成……所以如果你能帮我一把的话……谢谢查看……
composite.fsh:
#version 120
uniform sampler2D colortex0;
varying vec2 texcoord;
void main() {
vec4 color = texture2D(colortex0, texcoord);
float lum = dot(color.rgb, vec3(0.299, 0.587, 0.114));
// 1. 消除白色地平线墙
if (color.r > 0.90 && color.g > 0.90 && color.b > 0.90 && texcoord.y > 0.35) {
color.rgb = mix(color.rgb, vec3(0.55, 0.70, 0.90), 0.45);
}
// 2. 附魔魔法闪光黑客(检测紫色/蓝色魔法并使其闪耀)
if (color.b > 0.55 && color.r > 0.40 && color.g < 0.35) {
color.rgb *= 1.8;
color.b += 0.2;
}
// 3. 白天与夜晚的色彩分级
if (lum < 0.22) {
color.rgb *= vec3(0.55, 0.68, 1.05); // 黑暗的大气夜晚
} else {
color.r *= 1.10;
color.g *= 1.04;
color.b *= 0.90; // 温暖的电影感白天
}
// 4. 柔和对比度曲线
color.rgb = pow(color.rgb, vec3(1.04));
// 5. 平滑的电影感暗角
float dist = distance(texcoord, vec2(0.5, 0.5));
float vignette = smoothstep(0.88, 0.35, dist);
color.rgb *= mix(0.78, 1.0, vignette);
gl_FragColor = clamp(color, 0.0, 1.0);
}
composite.vsh:
#version 120
varying vec2 texcoord;
void main() {
gl_Position = ftransform();
texcoord = gl_MultiTexCoord0.st;
}
gbuffers_terrain.fsh:
#version 120
uniform sampler2D texture;
uniform sampler2D lightmap;
varying vec2 texcoord;
varying vec2 lmcoord;
varying vec4 glcolor;
void main() {
vec4 texColor = texture2D(texture, texcoord);
vec4 color = texColor * glcolor;
vec4 light = texture2D(lightmap, lmcoord);
vec3 finalColor = color.rgb * light.rgb;
// 严格检测宝石
// 我们移除了铁、石英、煤和深层矿石,以防止末地石、流纹岩和树木发光。
bool isDiamond = (texColor.b > 0.65 && texColor.g > 0.50 && texColor.r < 0.20);
bool isEmerald = (texColor.g > 0.65 && texColor.r < 0.15 && texColor.b < 0.20);
bool isRedstne = (texColor.r > 0.65 && texColor.g < 0.15 && texColor.b < 0.15);
bool isLapis = (texColor.b > 0.60 && texColor.r < 0.20 && texColor.g < 0.35);
// "texColor.b < 0.15" 严格保护末地石不发出如闪光弹般的光芒
bool isGold = (texColor.r > 0.70 && texColor.g > 0.60 && texColor.b < 0.15);
// 仅在完美匹配饱和宝石时应用发光
if (isDiamond || isEmerald || isRedstne || isGold || isLapis) {
// max() 确保它在洞穴中明亮发光,但在表面上不会亮到刺眼的白色
finalColor = max(finalColor, texColor.rgb * 1.15);
}
gl_FragColor = vec4(finalColor, color.a);
}
gbuffers_terrain.vsh:
#version 120
varying vec2 texcoord;
varying vec2 lmcoord;
varying vec4 glcolor;
uniform float frameTimeCounter;
void main() {
vec4 position = gl_Vertex;
// 严格的绿色检查,以确保只有树叶和草地摆动
bool isTrueLeaf = (gl_Color.g > gl_Color.r * 1.30) && (gl_Color.g > gl_Color.b * 1.20) && (gl_Color.g > 0.30);
if (isTrueLeaf) {
float wave = sin(frameTimeCounter * 1.8 + position.x * 1.2 + position.z * 1.2) * 0.025;
position.x += wave;
position.z += wave * 0.5;
}
gl_Position = gl_ModelViewProjectionMatrix * position;
texcoord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy;
lmcoord = (gl_TextureMatrix[1] * gl_MultiTexCoord1).xy;
glcolor = gl_Color;
}
gbuffers_water.fsh:
#version 120
uniform sampler2D texture;
uniform sampler2D lightmap;
varying vec2 texcoord;
varying vec2 lmcoord;
varying vec4 glcolor;
void main() {
vec4 texColor = texture2D(texture, texcoord);
vec4 light = texture2D(lightmap, lmcoord);
vec4 color = texColor * glcolor;
// 检测水:原版水的生物群系着色(glcolor),玻璃和冰则没有。
bool isWater = (glcolor.r < 0.99 || glcolor.g < 0.99 || glcolor.b < 0.99);
if (isWater) {
// 100% 擦除像素化的原版纹理,使用纯粹、平滑的电影感色彩
color.rgb = vec3(0.05, 0.40, 0.70);
// 赋予其平滑且均匀一致的透明度
color.a = 0.85;
}
// 应用阴影和光照(这样水在洞穴中仍然会变暗)
color.rgb *= light.rgb;
gl_FragColor = color;
}
gbuffers_water.vsh:
#version 120
varying vec2 texcoord;
varying vec2 lmcoord;
varying vec4 glcolor;
uniform float frameTimeCounter;
void main() {
vec4 position = gl_Vertex;
// 细微的物理水波效果
float wave = sin(frameTimeCounter * 2.2 + position.x * 1.8 + position.z * 1.8) * 0.03;
position.y += wave;
gl_Position = gl_ModelViewProjectionMatrix * position;
texcoord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy;
lmcoord = (gl_TextureMatrix[1] * gl_MultiTexCoord1).xy;
glcolor = gl_Color;
}
如果你愿意帮忙,你可以... 谢谢
" please read.
its a lightweight shader for a really really low spec setup, it has waving leaves, waving water, smooth lighting and water. nether and end lighting are good, the gemstone ores glow like redstone, diamond, lapis, gold. nothing else cause i made not using bloc id but color, so you will see anything thats colored like those gemstone ill glow... you will see also there is a white wall type thing all around, thats a problem too, i tried to do something but didnt go well...... the underwater is clearly seeable but not too far, it has shadows too...... you might also find that endermen and spiders dont have eyes, the texture is glitched a little, tried to fix that too but it got worse, but alway remember to not look at endermen. and the grass is wavy too so the problem is its edges leak light and when it waves its tore so you can see through them at the corener... no fancy cloud or sun light.. and you can see under lava... im not a modder or coder. but i hope you enjoy it... if you happen to be a coder, there is no problem fixing it..... i wil try to leave the codes..... i made it because of my own set up cause it really too dead end potato pc.. and its fully made by gemini... so if you can try to help me out.... thanks for checking.....
composite.fsh:
#version 120
uniform sampler2D colortex0;
varying vec2 texcoord;
void main() {
vec4 color = texture2D(colortex0, texcoord);
float lum = dot(color.rgb, vec3(0.299, 0.587, 0.114));
// 1. Kill the White Horizon Wall
if (color.r > 0.90 && color.g > 0.90 && color.b > 0.90 && texcoord.y > 0.35) {
color.rgb = mix(color.rgb, vec3(0.55, 0.70, 0.90), 0.45);
}
// 2. Enchantment Magic Glint Hack (Detects purple/blue magic and makes it shine)
if (color.b > 0.55 && color.r > 0.40 && color.g < 0.35) {
color.rgb *= 1.8;
color.b += 0.2;
}
// 3. Day vs Night Color Grading
if (lum < 0.22) {
color.rgb *= vec3(0.55, 0.68, 1.05); // Dark atmospheric nights
} else {
color.r *= 1.10;
color.g *= 1.04;
color.b *= 0.90; // Warm cinematic days
}
// 4. Soft Contrast Curve
color.rgb = pow(color.rgb, vec3(1.04));
// 5. Smooth Cinematic Vignette
float dist = distance(texcoord, vec2(0.5, 0.5));
float vignette = smoothstep(0.88, 0.35, dist);
color.rgb *= mix(0.78, 1.0, vignette);
gl_FragColor = clamp(color, 0.0, 1.0);
}
composite.vsh:
#version 120
varying vec2 texcoord;
void main() {
gl_Position = ftransform();
texcoord = gl_MultiTexCoord0.st;
}
gbuffers_terrain.fsh:
#version 120
uniform sampler2D texture;
uniform sampler2D lightmap;
varying vec2 texcoord;
varying vec2 lmcoord;
varying vec4 glcolor;
void main() {
vec4 texColor = texture2D(texture, texcoord);
vec4 color = texColor * glcolor;
vec4 light = texture2D(lightmap, lmcoord);
vec3 finalColor = color.rgb * light.rgb;
// STRICT GEMSTONE DETECTION
// We removed Iron, Quartz, Coal, and Debris to stop Endstone, Diorite, and Trees from glowing.
bool isDiamond = (texColor.b > 0.65 && texColor.g > 0.50 && texColor.r < 0.20);
bool isEmerald = (texColor.g > 0.65 && texColor.r < 0.15 && texColor.b < 0.20);
bool isRedstne = (texColor.r > 0.65 && texColor.g < 0.15 && texColor.b < 0.15);
bool isLapis = (texColor.b > 0.60 && texColor.r < 0.20 && texColor.g < 0.35);
// The "texColor.b < 0.15" strictly protects Endstone from glowing like a flashbang
bool isGold = (texColor.r > 0.70 && texColor.g > 0.60 && texColor.b < 0.15);
// Apply glow ONLY if it perfectly matches a saturated gem
if (isDiamond || isEmerald || isRedstne || isGold || isLapis) {
// max() ensures it glows brightly in caves, but doesn't blow out to blinding white on the surface
finalColor = max(finalColor, texColor.rgb * 1.15);
}
gl_FragColor = vec4(finalColor, color.a);
}
gbuffers_terrain.vsh:
#version 120
varying vec2 texcoord;
varying vec2 lmcoord;
varying vec4 glcolor;
uniform float frameTimeCounter;
void main() {
vec4 position = gl_Vertex;
// Strict green check so only leaves and grass wave
bool isTrueLeaf = (gl_Color.g > gl_Color.r * 1.30) && (gl_Color.g > gl_Color.b * 1.20) && (gl_Color.g > 0.30);
if (isTrueLeaf) {
float wave = sin(frameTimeCounter * 1.8 + position.x * 1.2 + position.z * 1.2) * 0.025;
position.x += wave;
position.z += wave * 0.5;
}
gl_Position = gl_ModelViewProjectionMatrix * position;
texcoord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy;
lmcoord = (gl_TextureMatrix[1] * gl_MultiTexCoord1).xy;
glcolor = gl_Color;
}
gbuffers_water.fsh:
#version 120
uniform sampler2D texture;
uniform sampler2D lightmap;
varying vec2 texcoord;
varying vec2 lmcoord;
varying vec4 glcolor;
void main() {
vec4 texColor = texture2D(texture, texcoord);
vec4 light = texture2D(lightmap, lmcoord);
vec4 color = texColor * glcolor;
// Detect Water: Vanilla water has a biome tint (glcolor), glass and ice do not.
bool isWater = (glcolor.r < 0.99 || glcolor.g < 0.99 || glcolor.b < 0.99);
if (isWater) {
// 100% erase the pixelated vanilla texture and use a pure, smooth cinematic color
color.rgb = vec3(0.05, 0.40, 0.70);
// Give it a smooth, perfectly even transparency
color.a = 0.85;
}
// Apply shadows and lighting (so water still gets dark in caves)
color.rgb *= light.rgb;
gl_FragColor = color;
}
gbuffers_water.vsh:
#version 120
varying vec2 texcoord;
varying vec2 lmcoord;
varying vec4 glcolor;
uniform float frameTimeCounter;
void main() {
vec4 position = gl_Vertex;
// Subtle physical water wave
float wave = sin(frameTimeCounter * 2.2 + position.x * 1.8 + position.z * 1.8) * 0.03;
position.y += wave;
gl_Position = gl_ModelViewProjectionMatrix * position;
texcoord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy;
lmcoord = (gl_TextureMatrix[1] * gl_MultiTexCoord1).xy;
glcolor = gl_Color;
}
if you want to help me you can... thanks
评论 0
登录后参与评分
还没有评论,来抢沙发吧