public void OnSetFinalUniforms(ShaderProgramFinal final) { var ssrOutFB = _framebuffers[(int)EnumSSRFB.Out]; var ssrFB = _framebuffers[(int)EnumSSRFB.SSR]; var causticsFB = _framebuffers[(int)EnumSSRFB.Caustics]; if (!_enabled) { return; } if (ssrOutFB == null) { return; } final.BindTexture2D("ssrScene", ssrOutFB.ColorTextureIds[0]); if ((_refractionsEnabled || _causticsEnabled) && ssrFB != null) { final.UniformMatrix("projectionMatrix", _mod.CApi.Render.CurrentProjectionMatrix); final.BindTexture2D("gpositionScene", ssrFB.ColorTextureIds[0]); final.BindTexture2D("gdepthScene", _platform.FrameBuffers[(int)EnumFrameBuffer.Primary].DepthTextureId); } if (_refractionsEnabled && ssrFB != null) { final.BindTexture2D("refractionScene", ssrFB.ColorTextureIds[3]); } if (_causticsEnabled && causticsFB != null) { final.BindTexture2D("causticsScene", causticsFB.ColorTextureIds[0]); } }
public static void FinalCallsite(ShaderProgramFinal final) { VolumetricShadingMod.Instance.Events.EmitPreFinalRender(final); }
public void EmitPreFinalRender(ShaderProgramFinal final) { PreFinalRender?.Invoke(final); }
public static void FinalCallsite(ShaderProgramFinal final) { ShadersMod.Instance.ScreenSpaceReflections.OnSetFinalUniforms(final); }