To fix the issue of Unity’s lack of Screen Space Reflections, I cobbled together a script that would allow me to refresh the images of a reflection probe based on the cameras position.
This is not a problem, in fact it works quite well.
The issue is however the framerate; While using this script, the reflection refresh rate is not adequate for a video game.
Even though the game itself is running at 60 frames, I feel like it is too sluggish and jittery for use.
If someone could take the time to test this in their scene, and possibly can think of any way to fix it, this would be greatly appreciated.
To use this script, place a reflection probe under your first-person controllers camera, increase the size to 20, 20, 20 or anything big enough for testing, set the reflection probes type to realtime, refresh to Via scripting and attach the script to the reflection probe.
Please note that this effect is a lot smoother when VSync is disabled and the game shoots up to 200 frames, not sure why but 60 frames should be more than enough, not sure why it is so delayed and jittery.
The Script
using UnityEngine;
public class RealtimeReflection : MonoBehaviour
{
ReflectionProbe probe;
void Awake()
{
probe = GetComponent<ReflectionProbe>();
}
void Update()
{
probe.transform.position = new Vector3(
Camera.main.transform.position.x,
Camera.main.transform.position.y * -1,
Camera.main.transform.position.z
);
probe.RenderProbe();
}
}