From cf9c5aea2086cb88b5ea4b4487a94e29d9851e83 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Fri, 15 Feb 2019 16:22:49 -0600 Subject: [PATCH] output ibl to it's own namedtexture, flipped the result back onto the stack post-calc to stop it polluting the backbuffer for all other render passes --- .../client/lighting/advanced/shaders.cs | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Templates/Full/game/core/scripts/client/lighting/advanced/shaders.cs b/Templates/Full/game/core/scripts/client/lighting/advanced/shaders.cs index 950919afb..6d51c1484 100644 --- a/Templates/Full/game/core/scripts/client/lighting/advanced/shaders.cs +++ b/Templates/Full/game/core/scripts/client/lighting/advanced/shaders.cs @@ -353,6 +353,26 @@ singleton PostEffect( reflectionProbeArrayPostFX ) texture[1] = "#color"; texture[2] = "#matinfo"; texture[3] = "core/art/pbr/brdfTexture.dds"; + targetClearColor = "0 0 0 0"; + targetClear = PFXTargetClear_OnDraw; + targetFormat = "GFXFormatR16G16B16A16F"; + target = "#iblBuffer"; - target = "AL_FormatToken"; +}; +singleton PostEffect( IBLFlipPostFX ) +{ + // Do not allow the selection effect to work in reflection + // passes by default so we don't do the extra drawing. + //allowReflectPass = false; + + renderTime = "PFXAfterBin"; + renderBin = "ProbeBin"; + renderPriority = 9998; + isEnabled = true; + + shader = PFX_PassthruShader; + stateBlock = PFX_DefaultStateBlock; + + texture[0] = "#iblBuffer"; + targetFormat = AL_FormatToken.format; }; \ No newline at end of file