From 3da1622478c43366c6c6c04561edfa4252064c24 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 12 Oct 2026 04:53:18 +0200 Subject: [PATCH] Vapour presenter: draw the sim's OpacityAt directly, not divided by the cloud's raw Opacity OpacityAt is already saturated to 0..1 by the sim, so a 0.3 vent reads thinner than a full cloud and nothing above full draws thinner. Builds (Unity compile run after). Co-Authored-By: Claude Opus 5.5 --- Assets/Scripts/Zone Display/VapourCloudInstance.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Assets/Scripts/Zone Display/VapourCloudInstance.cs b/Assets/Scripts/Zone Display/VapourCloudInstance.cs index 74ec1abf5..594221332 100644 --- a/Assets/Scripts/Zone Display/VapourCloudInstance.cs +++ b/Assets/Scripts/Zone Display/VapourCloudInstance.cs @@ -4,8 +4,7 @@ using UnityEngine; // How one vented vapour cloud looks: a fog-bank brush painted into the Patch layer, which the volumetric pass reads as // patch thickness. Zone owns every cloud fact (existence, body, radius, opacity); this reads them and draws, and writes -// nothing back (rulings vapour-cloud-obscuration, unity-presents-only-r3). The brush's depth thins with the cloud's -// opacity, so the bank fades to nothing at the cloud's lifetime. +// nothing back (rulings vapour-cloud-obscuration, unity-presents-only-r3). The brush's depth scales with the sim's OpacityAt, so the bank fades to nothing at the cloud's lifetime. public class VapourCloudInstance : MonoBehaviour { // The world height the scene's patch brushes sit at (Depth Micro), inside the Patch camera's clip range. @@ -37,10 +36,9 @@ public class VapourCloudInstance : MonoBehaviour transform.position = new Vector3(p.x, PatchHeight, p.y); transform.localScale = Vector3.one * (2f * _cloud.Radius); - // A cloud with no opacity left is already gone from the sim; a zero Opacity would divide by zero. - var thinning = _cloud.Opacity > 0f ? _cloud.OpacityAt(_zone.Time) / _cloud.Opacity : 0f; + // The sim's own opacity, already saturated to 0..1 (VapourCloud.OpacityAt); the presenter adds no rule of its own. _renderer.GetPropertyBlock(_block); - _block.SetFloat(Depth, _authoredDepth * thinning); + _block.SetFloat(Depth, _authoredDepth * _cloud.OpacityAt(_zone.Time)); _renderer.SetPropertyBlock(_block); } }