I would like ssao will only be turned on when the scene is still.
For example, if the camera position changes, an animation is played, or the object moves, ssao will stop.
Oh yeah, it will be super slow to readPixels. I am not sure how to do that easily.
The other way would be to monitor the translation of all dynamic entities in your scene (including the camera). If everything is at rest then the scene is static. Though if thatβs easy/feasible to do in your scene it depends on the number of objects etc.