public ScreenSpaceReflections(VolumetricShadingMod mod)
        {
            _mod = mod;

            _game     = mod.CApi.GetClient();
            _platform = _game.GetClientPlatformWindows();

            RegisterInjectorProperties();

            mod.CApi.Event.ReloadShader += ReloadShaders;
            mod.Events.PreFinalRender   += OnSetFinalUniforms;
            mod.ShaderPatcher.OnReload  += RegeneratePatches;

            _enabled            = ModSettings.ScreenSpaceReflectionsEnabled;
            _rainEnabled        = ModSettings.SSRRainReflectionsEnabled;
            _refractionsEnabled = ModSettings.SSRRefractionsEnabled;
            _causticsEnabled    = ModSettings.SSRCausticsEnabled;

            mod.CApi.Settings.AddWatcher <bool>("volumetricshading_screenSpaceReflections", OnEnabledChanged);
            mod.CApi.Settings.AddWatcher <bool>("volumetricshading_SSRRainReflections", OnRainReflectionsChanged);
            mod.CApi.Settings.AddWatcher <bool>("volumetricshading_SSRRefractions", OnRefractionsChanged);
            mod.CApi.Settings.AddWatcher <bool>("volumetricshading_SSRCaustics", OnCausticsChanged);

            mod.CApi.Event.RegisterRenderer(this, EnumRenderStage.Opaque, "ssrWorldSpace");
            mod.CApi.Event.RegisterRenderer(this, EnumRenderStage.AfterOIT, "ssrOut");

            _textureIdsField =
                typeof(ChunkRenderer).GetField("textureIds", BindingFlags.Instance | BindingFlags.NonPublic);

            mod.Events.RebuildFramebuffers += SetupFramebuffers;
            SetupFramebuffers(_platform.FrameBuffers);
        }