Quantcast
Channel: Questions in topic: "post processing"
Viewing all articles
Browse latest Browse all 713

can't change color of volumetric fog

$
0
0
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Rendering; using UnityEngine.Rendering.HighDefinition; public class EnvironmentManager : MonoBehaviour { [SerializeField] private Volume _volume; [SerializeField] private Color _green; [SerializeField] private Color _yellow; [SerializeField] private Color _white; [SerializeField] private Color _black; private Fog _fog; string _currentBiome; private void Start() { _volume.sharedProfile.TryGet(out _fog); } private void OnTriggerEnter(Collider other) { _currentBiome = other.tag; switch (_currentBiome) { case "Plains": _fog.albedo = new ColorParameter(_green, true); break; case "Desert": _fog.albedo = new ColorParameter(_yellow, true); break; case "Arctic": _fog.albedo = new ColorParameter(_white, true); break; case "Dungen": _fog.albedo = new ColorParameter(_black, true); break; } } I ![alt text][1] [1]: /storage/temp/185968-capture.png When I try changing the albedo on the inspector while in playmode, it changes accordingly but when I use this script, it changes in inspector but not in the actual game

Viewing all articles
Browse latest Browse all 713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>