I wanted to get on here and say I fully do not understand how IsActive() in custom HDRP post processing scripts functions. I will have a setup like this:
public BoolParameter enabled = new BoolParameter(false);
public MinIntParameter iterations = new MinIntParameter(128, 16);
private float testRad;
private Bounds fluidBounds;
private GraphicsBuffer particleBuffer;
private Material overlayMat;
private ComputeShader sphRenderShader;
private int sphRenderKernel;
public bool IsActive() => enabled.value;
And then in another script I will test this:
private void Update()
{
Debug.Log(rend.IsActive());
rend.SetFluidVars(particleBuffer, FluidBounds, particleRad * 20f);
visualize.SetGraphicsBuffer("ParticleBuffer", particleBuffer);
visualize.SetInt("ParticleCount", TotalParticles);
visualize.SetFloat("FrameTime", Time.deltaTime);
}
And all I get in the console is False. This happens regardless of if I instance the volume during playmode, have it setup beforehand, turn enable on and off a million times. Please someone explain to me how this stupid function works because it makes no sense genuinely.