Brighter lava surface, glow and lights
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d76e74b4b0
commit
e05392919e
1 file changed
+4
-4
+4
-4
@@ -284,12 +284,12 @@ void main() {
|
|||||||
// light rippling over the surface: glints on water; lava glows by itself and pulses
|
// light rippling over the surface: glints on water; lava glows by itself and pulses
|
||||||
if (liquid) {
|
if (liquid) {
|
||||||
if (color.a < 0.5) {
|
if (color.a < 0.5) {
|
||||||
light = max(light, vec3(1.45, 1.3, 1.2)) * (1.0 + wave * 0.18);
|
light = max(light, vec3(1.9, 1.65, 1.45)) * (1.0 + wave * 0.18);
|
||||||
} else {
|
} else {
|
||||||
light *= 1.0 + wave * 0.28;
|
light *= 1.0 + wave * 0.28;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gl_FragColor = vec4(tex.rgb * min(light, vec3(1.9)), 1.0);
|
gl_FragColor = vec4(tex.rgb * min(light, vec3(liquid && color.a < 0.5 ? 2.4 : 1.9)), 1.0);
|
||||||
}
|
}
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
@@ -479,7 +479,7 @@ fn amb_at(f: &[f32], x: f32, z: f32) -> f32 {
|
|||||||
|
|
||||||
// ---- lava light: an orange glow up to LAVA_REACH tiles around lava, fading with the distance
|
// ---- lava light: an orange glow up to LAVA_REACH tiles around lava, fading with the distance
|
||||||
const LAVA_REACH: f32 = 10.0;
|
const LAVA_REACH: f32 = 10.0;
|
||||||
const LAVA_LIGHT: Vec3 = Vec3::new(1.05, 0.45, 0.08); // added light at full strength (next to the lava)
|
const LAVA_LIGHT: Vec3 = Vec3::new(1.3, 0.56, 0.1); // added light at full strength (next to the lava)
|
||||||
|
|
||||||
// glow per tile: 1 on lava, falling to 0 at LAVA_REACH tiles. The light spreads over open ground
|
// glow per tile: 1 on lava, falling to 0 at LAVA_REACH tiles. The light spreads over open ground
|
||||||
// (walls are lit on their faces but do not let it through).
|
// (walls are lit on their faces but do not let it through).
|
||||||
@@ -1134,7 +1134,7 @@ impl R3d {
|
|||||||
for x in (ccx - r).max(0)..(ccx + r).min(mw() as i32) {
|
for x in (ccx - r).max(0)..(ccx + r).min(mw() as i32) {
|
||||||
if x % 3 == 0 && g.map.t[idx(x, z)].kind == Kind::Lava {
|
if x % 3 == 0 && g.map.t[idx(x, z)].kind == Kind::Lava {
|
||||||
let fl = 0.8 + 0.2 * (t * 2.0 + (x * 7 + z * 3) as f32).sin();
|
let fl = 0.8 + 0.2 * (t * 2.0 + (x * 7 + z * 3) as f32).sin();
|
||||||
push(vec3(x as f32 + 0.5, 0.3, z as f32 + 0.5), 5.0, vec3(1.0, 0.45, 0.12), 1.3 * fl, 0.0);
|
push(vec3(x as f32 + 0.5, 0.3, z as f32 + 0.5), 5.5, vec3(1.0, 0.45, 0.12), 1.7 * fl, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user