Grid/ScifiProfile.cs
using Sandbox;
using static Sandbox.Tonemapping;
namespace SWB.Visuals.Profiles;
public sealed class SciFiProfile : CinematicProfile
{
public override TonemappingMode Tonemap => TonemappingMode.ACES;
public override bool EnableBloom => true;
public override float BloomThreshold => 0.75f;
protected override void ApplyLighting()
{
var cam = Scene.Camera;
if (cam == null)
return;
// ─────────────────────────────
// KEY (Directional)
// ─────────────────────────────
var keyGO = GetOrCreateLight("KeyLight");
var key = keyGO.Components.GetOrCreate<DirectionalLight>();
key.LightColor = new Color(0.67f, 0.82f, 1.0f);
key.Shadows = true;
// suunta alas ja sivulta
keyGO.Transform.Rotation =
Rotation.LookAt(new Vector3(-1, -1, -2));
// ─────────────────────────────
// FILL (Point)
// ─────────────────────────────
var fillGO = GetOrCreateLight("FillLight");
var fill = fillGO.Components.GetOrCreate<PointLight>();
fill.LightColor = new Color(0.45f, 0.55f, 0.75f);
fill.Radius = 1500f;
fill.Shadows = false;
fillGO.Transform.Position =
cam.Transform.Position +
cam.Transform.Rotation.Right * 300f +
cam.Transform.Rotation.Up * 200f;
// ─────────────────────────────
// ACCENT (Spot)
// ─────────────────────────────
var accentGO = GetOrCreateLight("AccentLight");
var accent = accentGO.Components.GetOrCreate<SpotLight>();
accent.LightColor = Color.Cyan;
accent.Radius = 800f;
accent.ConeInner = 20f;
accent.ConeOuter = 35f;
accent.Shadows = false;
accentGO.Transform.Position =
cam.Transform.Position -
cam.Transform.Rotation.Forward * 300f +
cam.Transform.Rotation.Up * 150f;
accentGO.Transform.Rotation = cam.Transform.Rotation;
}
}