diff --git a/docs/screenshots/01-venue-overview.png b/docs/screenshots/01-venue-overview.png index 8cc74f3..2c9d991 100644 Binary files a/docs/screenshots/01-venue-overview.png and b/docs/screenshots/01-venue-overview.png differ diff --git a/docs/screenshots/02-targeting-npc.png b/docs/screenshots/02-targeting-npc.png index 921971b..7f81906 100644 Binary files a/docs/screenshots/02-targeting-npc.png and b/docs/screenshots/02-targeting-npc.png differ diff --git a/docs/screenshots/05-late-night-avenue.png b/docs/screenshots/05-late-night-avenue.png index bee1d80..ec7a2ff 100644 Binary files a/docs/screenshots/05-late-night-avenue.png and b/docs/screenshots/05-late-night-avenue.png differ diff --git a/docs/screenshots/06-night-flashlight.png b/docs/screenshots/06-night-flashlight.png index 3014343..8fa1af0 100644 Binary files a/docs/screenshots/06-night-flashlight.png and b/docs/screenshots/06-night-flashlight.png differ diff --git a/docs/screenshots/08-escalation-hud.png b/docs/screenshots/08-escalation-hud.png index 3571093..a905511 100644 Binary files a/docs/screenshots/08-escalation-hud.png and b/docs/screenshots/08-escalation-hud.png differ diff --git a/docs/screenshots/09-body-camera-timeline.png b/docs/screenshots/09-body-camera-timeline.png index cc2625c..370cc49 100644 Binary files a/docs/screenshots/09-body-camera-timeline.png and b/docs/screenshots/09-body-camera-timeline.png differ diff --git a/docs/screenshots/11-precision-walk.png b/docs/screenshots/11-precision-walk.png index 29e716f..99beb1e 100644 Binary files a/docs/screenshots/11-precision-walk.png and b/docs/screenshots/11-precision-walk.png differ diff --git a/src/game/materials.gd b/src/game/materials.gd index f174114..03a9486 100644 --- a/src/game/materials.gd +++ b/src/game/materials.gd @@ -139,13 +139,21 @@ static func light_beam() -> StandardMaterial3D: mat.cull_mode = BaseMaterial3D.CULL_DISABLED mat.depth_draw_mode = BaseMaterial3D.DEPTH_DRAW_DISABLED mat.albedo_color = Color(1.0, 0.95, 0.82, 1.0) - var fade := Gradient.new() - fade.set_color(0, Color(1.0, 0.95, 0.82, 0.08)) - fade.add_point(0.15, Color(1.0, 0.95, 0.82, 0.5)) - fade.set_color(fade.get_point_count() - 1, Color(1.0, 0.95, 0.82, 0.0)) - var ramp := GradientTexture1D.new() - ramp.gradient = fade - mat.albedo_texture = ramp + # A vertical ramp, not a GradientTexture1D: a cylinder's UV.y runs along its + # height, while the 1D gradient varies with U and would paint a bright ring. + var ramp := Image.create(1, 64, false, Image.FORMAT_RGBA8) + for y in 64: + var t := float(y) / 63.0 + # Symmetric fade (bright in the middle, gone at both ends) so the look + # does not depend on which way CylinderMesh orients its V coordinate; the + # far end must never show as a bright ring. + var alpha := 0.0 + if t < 0.5: + alpha = lerpf(0.0, 0.3, t / 0.5) + else: + alpha = lerpf(0.3, 0.0, (t - 0.5) / 0.5) + ramp.set_pixel(0, y, Color(1.0, 1.0, 1.0, alpha)) + mat.albedo_texture = ImageTexture.create_from_image(ramp) mat.texture_filter = BaseMaterial3D.TEXTURE_FILTER_LINEAR return mat