Thanks to another poster here , I discovered that the ‘w’ value of LiftGammaGain.gamma.value is what actually changes the gamma. x, y and z only change the color hues in r, g, b respectively. Not only that, but the xyz values in the inspector don’t even match the values that they have in code, for no apparent reason, and the w value isn’t even shown in the inspector.
tldr, here’s the full code for anyone in the future who might stumble upon this thread:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;
public class UserSettings : MonoBehaviour
{
private LiftGammaGain gamma;
private Volume volume;
private void Start()
{
volume = GetComponent<Volume>();
volume.profile.TryGet<LiftGammaGain>(out gamma);
}
public void AdjustGamma(float value)
{
gamma.gamma.value = new Vector4(1f, 1f, 1f, value);
}
}