Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //----------------------------------------------------------------------------------------------//
- // DYNAMIC GAUSSIAN BLOOM 2.2 //
- //----------------------------------------------------------------------------------------------//
- // //
- // enbbloom.fx file by LonelyKitsuune aka Skratzer //
- // for ENB (DirectX 11 Shader Model 5) //
- // //
- // Copyright (c) 2018-2020 LoneKitsuune / T.Thanner - CC BY-NC-ND 4.0 //
- // //
- //-------------------------------------------CREDITS--------------------------------------------//
- // //
- // Boris Vorontsov for ENBSeries //
- // //
- //------------------------------------------THANKS TO-------------------------------------------//
- // //
- // prod80, Sonic Ether, Sandvich Maker and Marty McFly for inspiration //
- // //
- //----------------------------------------------------------------------------------------------//
- // ================================== //
- // // Silent Horizons ENB // //
- // // // //
- // // by LonelyKitsuune // //
- // ================================== //
- //----------------------------------------------------------------------------------------------//
- /*¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\
- | Multipass Bloom Flow Chart: |
- | |
- | |
- |PREPASS ---> Horizontal Gaussian Blur |-------> Horizontal Gaussian Blur |-------> Horizontal Gaussian Blur |
- | \ / | \ / | \ / |
- | Vertical Gaussian Blur | Vertical Gaussian Blur | Vertical Gaussian Blur |
- | \ / | \ / | \ / |
- | RenderTarget1024 -------| RenderTarget512 -----------| RenderTarget256 ------- ... |
- | | | | |
- | | | | |
- | | | | |
- | ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯Load in all RenderTargets¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ... |
- | | | |
- | | | |
- | \ / |
- | MIX |
- | \ / |
- | BLOOM OUTPUT |
- \______________________________________________________________________________________________________________________________*/
- //Boris' comment on ENB bloom files:
- //Works with hdr input and output
- //Bloom texture is always forced to 1024*1024 resolution
- //This file needs my helper and UI files to work!
- //Some options could be made UI tweakable instead
- //--------------------------------------------------------------------------------
- //Enables full local control over this shader file
- #define LOCAL_OVERRIDE 0 //[0-1]
- //--------------------------------------------------------------------------------
- //GENERAL OPTIONS
- //--------------------------------------------------------------------------------
- //Enable additional debugging tools
- #define ENABLE_TOOLS 0 //[0-1]
- //--------------------------------------------------------------------------------
- //PREPASS OPTIONS
- //--------------------------------------------------------------------------------
- //Switch the prepass variant
- #define BLOOM_PREPASS_STYLE 2 //[1-2]
- // 1 = Levels
- // 2 = Thresholds
- //UI seperation mode for the prepass
- #define UI_SEP_MODE_PRE 1 //[1-2]
- // 1 = TODIE seperated UI
- // 2 = DNI seperated UI
- //--------------------------------------------------------------------------------
- //MAIN BLOOM OPTIONS
- //--------------------------------------------------------------------------------
- //UI seperation mode for the main pass
- #define UI_SEP_MODE_MAIN 1 //[1-2]
- // 1 = TODIE seperated UI
- // 2 = DNI seperated UI
- //Enables a more agressive correction method that gets rid of
- //bright bloom flares at screen borders.
- // -> Can produces small visual artifacts!
- #define ENABLE_AGRESSIVE_BORDER_CORRECTION 0 //[0-1]
- //Enables depth based bloom width/intensity manipulation
- #define ENABLE_DEPTH_TESTING 0 //[0-1]-G
- //--------------------------------------------------------------------------------
- //BLOOM MIX OPTIONS
- //--------------------------------------------------------------------------------
- //Use automatic pass weighting
- #define ENABLE_AUTOMATIC_WEIGHTING 0 //[0-1]
- //Use bicubic filtering to upsample bloom pass textures
- #define USE_BICUBIC_FILTERING 0 //[0-1]
- //Activate per pass Bloom tinting
- #define ENBALE_BLOOM_TINTING 0 //[0-1]
- //Enables a additional small scale bloom for very bright objects
- #define ENABLE_TINYBLOOM 0 //[0-1]
- //Enables the option to mask out the bloom source
- #define ENABLE_SOURCE_MASKING 0 //[0-1]-G
- //Enable lens-dirt bloom reflections
- #define ENABLE_DIRT_REFLECTION 0 //[0-1]-G
- //Enable graining of the bloom output to reduce possible banding visiblity
- // -> If you dither after mixing in the bloom texture you probably don't need it
- #define ENABLE_BLOOM_GRAIN 0 //[0-1]
- //UI seperation mode for the mix pass
- #define UI_SEP_MODE_MIX 1 //[1-2]
- // 1 = TODIE seperated UI
- // 2 = DNI seperated UI
- //----------------------------------------------------------------------------------------------//
- // Global Parameters //
- //----------------------------------------------------------------------------------------------//
- #if !LOCAL_OVERRIDE
- #undef ENABLE_DEPTH_TESTING
- #undef ENABLE_SOURCE_MASKING
- #undef ENABLE_DIRT_REFLECTION
- #include "enbglobals.fxh"
- #endif //LOCAL_OVERRIDE
- //----------------------------------------------------------------------------------------------//
- // Internal Parameters //
- //----------------------------------------------------------------------------------------------//
- #include "UI/enbUI_Primer.fxh"
- //Tools
- #define SHADERGROUP 0
- #include "UI/enbUI_Bloom.fxh"
- #undef SHADERGROUP
- UI_WHITESPACE(7)
- //--------------------------------------------Prepass-------------------------------------------//
- #if BLOOM_PREPASS_STYLE != 0
- #if UI_SEP_MODE_PRE == 1 //Prepass (TODIE)
- #define SHADERGROUP 1
- #define TODIE Dawn
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(7)
- #define TODIE Sunrise
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(8)
- #define TODIE Day
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(9)
- #define TODIE Sunset
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(10)
- #define TODIE Dusk
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(11)
- #define TODIE Night
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(12)
- #define TODIE Interior
- #include "UI/enbUI_Bloom.fxh"
- UI_WHITESPACE(8)
- UI_WHITESPACE(9)
- #undef SHADERGROUP
- #undef NOTFIRSTTIME
- #elif UI_SEP_MODE_PRE == 2 //Prepass (DNI)
- #define SHADERGROUP 1
- #define TODIE Day
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(7)
- #define TODIE Night
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(8)
- #define TODIE Interior
- #include "UI/enbUI_Bloom.fxh"
- UI_WHITESPACE(8)
- UI_WHITESPACE(9)
- #undef SHADERGROUP
- #undef NOTFIRSTTIME
- #endif //UI_SEP_MODE_PRE
- #endif //BLOOM_PREPASS_STYLE
- //---------------------------------------------Main---------------------------------------------//
- #if UI_SEP_MODE_MAIN == 1 //Main Bloom (TODIE)
- #define SHADERGROUP 2
- #define TODIE Dawn
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(13)
- #define TODIE Sunrise
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(14)
- #define TODIE Day
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(15)
- #define TODIE Sunset
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(16)
- #define TODIE Dusk
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(17)
- #define TODIE Night
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(18)
- #define LASTTIME
- #define TODIE Interior
- #include "UI/enbUI_Bloom.fxh"
- UI_WHITESPACE(10)
- UI_WHITESPACE(11)
- #undef SHADERGROUP
- #undef NOTFIRSTTIME
- #elif UI_SEP_MODE_MAIN == 2 //Main Bloom (DNI)
- #define SHADERGROUP 2
- #define TODIE Day
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(13)
- #define TODIE Night
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(14)
- #define LASTTIME
- #define TODIE Interior
- #include "UI/enbUI_Bloom.fxh"
- UI_WHITESPACE(10)
- UI_WHITESPACE(11)
- #undef SHADERGROUP
- #undef NOTFIRSTTIME
- #endif //UI_SEP_MODE_MAIN
- //----------------------------------------------Mix---------------------------------------------//
- #if !ENABLE_AUTOMATIC_WEIGHTING
- #if UI_SEP_MODE_MIX == 1 //Bloom Mix (TODIE)
- #define SHADERGROUP 3
- #define TODIE Dawn
- #define SWSN 19
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(28)
- #define TODIE Sunrise
- #define SWSN 20
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(29)
- #define TODIE Day
- #define SWSN 21
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(30)
- #define TODIE Sunset
- #define SWSN 24
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(31)
- #define TODIE Dusk
- #define SWSN 25
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(32)
- #define TODIE Night
- #define SWSN 26
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(33)
- #define TODIE Interior
- #define SWSN 27
- #include "UI/enbUI_Bloom.fxh"
- //UI_WHITESPACE(12)
- //UI_WHITESPACE(13)
- #undef SHADERGROUP
- #undef NOTFIRSTTIME
- #elif UI_SEP_MODE_MIX == 2 //Bloom Mix (DNI)
- #define SHADERGROUP 3
- #define TODIE Day
- #define SWSN 19
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(28)
- #define TODIE Night
- #define SWSN 20
- #include "UI/enbUI_Bloom.fxh"
- UI_SPECIAL_WHITESPACE(29)
- #define TODIE Interior
- #define SWSN 21
- #include "UI/enbUI_Bloom.fxh"
- //UI_WHITESPACE(12)
- //UI_WHITESPACE(13)
- #undef SHADERGROUP
- #undef NOTFIRSTTIME
- #endif //UI_SEP_MODE_MIX
- #else
- #if UI_SEP_MODE_MIX == 1 //Bloom Mix (TODIE)
- #define SHADERGROUP 3
- #define TODIE Dawn
- #define SWSN 19
- #include "UI/enbUI_Bloom.fxh"
- #define TODIE Sunrise
- #define SWSN 20
- #include "UI/enbUI_Bloom.fxh"
- #define TODIE Day
- #define SWSN 21
- #include "UI/enbUI_Bloom.fxh"
- #define TODIE Sunset
- #define SWSN 24
- #include "UI/enbUI_Bloom.fxh"
- #define TODIE Dusk
- #define SWSN 25
- #include "UI/enbUI_Bloom.fxh"
- #define TODIE Night
- #define SWSN 26
- #include "UI/enbUI_Bloom.fxh"
- #define TODIE Interior
- #define SWSN 27
- #include "UI/enbUI_Bloom.fxh"
- #undef SHADERGROUP
- #undef NOTFIRSTTIME
- #elif UI_SEP_MODE_MIX == 2 //Bloom Mix (DNI)
- #define SHADERGROUP 3
- #define TODIE Day
- #define SWSN 19
- #include "UI/enbUI_Bloom.fxh"
- #define TODIE Night
- #define SWSN 20
- #include "UI/enbUI_Bloom.fxh"
- #define TODIE Interior
- #define SWSN 21
- #include "UI/enbUI_Bloom.fxh"
- #undef SHADERGROUP
- #undef NOTFIRSTTIME
- #endif //UI_SEP_MODE_MIX
- #endif //ENABLE_AUTOMATIC_WEIGHTING
- //----------------------------------------------------------------------------------------------//
- // External enb parameters, do not modify //
- // //
- //----------------------------------------------------------------------------------------------//
- float4 Timer; // x = generic timer in range 0..1, period of 16777216 ms (4.6 hours), y = average fps,
- // z = frame number (cyclically wraps to 0 after 9999 frames passed), w = frame time elapsed (in seconds)
- float4 ScreenSize; // x = Width, y = 1/Width, z = aspect, w = 1/aspect, aspect is Width/Height
- float AdaptiveQuality; // changes in range 0..1, 0 means full quality, 1 lowest dynamic quality (0.33, 0.66 are limits for quality levels)
- float4 TimeOfDay1; // x = dawn, y = sunrise, z = day, w = sunset. Interpolators range from 0..1
- float4 TimeOfDay2; // x = dusk, y = night. Interpolators range from 0..1
- float ENightDayFactor; // changes in range 0..1, 0 means that night time, 1 - day time
- float EInteriorFactor; // changes 0 or 1. 0 means that exterior, 1 - interior
- float FieldOfView; // FOV in degrees
- float4 Weather; // x = current weather index, y = outgoing weather index, z = weather transition, w = time of the day in 24 standard hours.
- // Weather index is value from weather ini file, for example WEATHER002 means index==2, but index==0 means that weather not captured.
- // -> Needs ENB Helper skse64 plugin to work correctly!
- //----------------------------------------------------------------------------------------------//
- // External enb debugging parameters for //
- // shader programmers, do not modify //
- //----------------------------------------------------------------------------------------------//
- float4 tempF1; //0,1,2,3
- float4 tempF2; //5,6,7,8
- float4 tempF3; //9,0
- //keyboard controlled temporary variables. Press and hold key 1,2,3...8 together with PageUp or PageDown to modify.
- //By default all set to 1.0
- float4 tempInfo1;
- // xy = cursor position in range 0..1 of screen;
- // z = is shader editor window active;
- // w = mouse buttons with values 0..7 as follows:
- // 0 = none
- // 1 = left
- // 2 = right
- // 3 = left+right
- // 4 = middle
- // 5 = left+middle
- // 6 = right+middle
- // 7 = left+right+middle (or rather cat is sitting on your mouse)
- float4 tempInfo2;
- // xy = cursor position of previous left mouse button click
- // zw = cursor position of previous right mouse button click
- //----------------------------------------------------------------------------------------------//
- // Game and mod parameters, do not modify //
- // //
- //----------------------------------------------------------------------------------------------//
- Texture2D TextureDownsampled; //color R16B16G16A16 64 bit or R11G11B10 32 bit hdr format. 1024*1024 size
- Texture2D TextureColor; //color which is output of previous technique (except when drawed to temporary render target), R16B16G16A16 64 bit hdr format. 1024*1024 size
- Texture2D TextureOriginal; //color R16B16G16A16 64 bit or R11G11B10 32 bit hdr format, screen size. PLEASE AVOID USING IT BECAUSE OF ALIASING ARTIFACTS, UNLESS YOU FIX THEM
- Texture2D TextureDepth; //scene depth R32F 32 bit hdr format, screen size. PLEASE AVOID USING IT BECAUSE OF ALIASING ARTIFACTS, UNLESS YOU FIX THEM
- Texture2D TextureAperture; //this frame aperture 1*1 R32F hdr red channel only. computed in PS_Aperture of enbdepthoffield.fx
- //temporary textures which can be set as render target for techniques via annotations like <string RenderTarget="RenderTargetRGBA32";>
- Texture2D RenderTarget1024; //R16B16G16A16F 64 bit hdr format, 1024*1024 size -- Used as bloom texture
- Texture2D RenderTarget512; //R16B16G16A16F 64 bit hdr format, 512*512 size -- Used as bloom texture
- Texture2D RenderTarget256; //R16B16G16A16F 64 bit hdr format, 256*256 size -- Used as bloom texture
- Texture2D RenderTarget128; //R16B16G16A16F 64 bit hdr format, 128*128 size -- Used as bloom texture
- Texture2D RenderTarget64; //R16B16G16A16F 64 bit hdr format, 64*64 size -- Used as bloom texture
- Texture2D RenderTarget32; //R16B16G16A16F 64 bit hdr format, 32*32 size -- Used as bloom texture
- Texture2D RenderTarget16; //R16B16G16A16F 64 bit hdr format, 16*16 size -- Used as bloom texture
- Texture2D RenderTargetRGBA32; //R8G8B8A8 32 bit ldr format, screen size
- Texture2D RenderTargetRGBA64F; //R16B16G16A16F 64 bit hdr format, screen size -- 1/4 Used as source passthrough if activated
- #if ENABLE_DIRT_REFLECTION
- //Atlas with 4 different lensdirt textures
- Texture2D LensDirtAtlas <string ResourceName="Textures/LensDirtTexAtlas.png";>;
- #endif
- SamplerState Point_Sampler
- {
- Filter = MIN_MAG_MIP_POINT;
- AddressU = Clamp;
- AddressV = Clamp;
- };
- SamplerState Linear_Sampler
- {
- Filter = MIN_MAG_MIP_LINEAR;
- AddressU = Clamp;
- AddressV = Clamp;
- };
- //Helper with some useful macros, variables and functions
- #include "Helper/enbHelper_Common.fxh"
- //----------------------------------------------------------------------------------------------//
- // Structs //
- // //
- //----------------------------------------------------------------------------------------------//
- struct VertexShaderInput
- {
- float3 pos : POSITION;
- float2 txcoord : TEXCOORD0;
- };
- struct VertexShaderOutputBasic
- {
- float4 pos : SV_POSITION;
- float2 texcoord : TEXCOORD;
- };
- struct VertexShaderOutputPrePass
- {
- float4 pos : SV_POSITION;
- float2 texcoord : TEXCOORD0;
- #if BLOOM_PREPASS_STYLE == 1
- NI float UI_InBlack : TODIE0;
- NI float UI_InWhite : TODIE1;
- NI float UI_OutBlack : TODIE2;
- NI float UI_OutWhite : TODIE3;
- NI float UI_Saturation : TODIE4;
- NI float UI_SkinAttenu : TODIE5;
- #elif BLOOM_PREPASS_STYLE == 2
- NI float UI_Brightness : TODIE0;
- NI float UI_Contrast : TODIE1;
- NI float UI_Saturation : TODIE2;
- NI float UI_ThresholdLower : TODIE3;
- NI float UI_ThresholdUpper : TODIE4;
- NI float UI_SkinAttenu : TODIE5;
- #endif
- };
- struct VertexShaderOutputMain
- {
- float4 pos : SV_POSITION;
- float2 texcoord : TEXCOORD0;
- #if ENABLE_DEPTH_TESTING
- float2 origtexcoord : TEXCOORD1;
- #endif
- NI bool Hori : PRECALC0;
- NI bool SkipPS : PRECALC1;
- NI float2 ScaledPixelSize : PRECALC2;
- NI float4 NewScreenSize : PRECALC3;
- NI float Intensity : PRECALC4;
- NI float Sigma : PRECALC5;
- NI float WeightFactor : PRECALC6;
- NI float LoopCount : PRECALC7;
- };
- struct VertexShaderOutputMix
- {
- float4 pos : SV_POSITION;
- float2 texcoord : TEXCOORD0;
- #if ENABLE_DIRT_REFLECTION
- float2 DirtCoords : TEXCOORD1;
- #endif
- NI float UI_RenderTargetStrength1024 : BSTRE0;
- NI float UI_RenderTargetStrength512 : BSTRE1;
- NI float UI_RenderTargetStrength256 : BSTRE2;
- NI float UI_RenderTargetStrength128 : BSTRE3;
- NI float UI_RenderTargetStrength64 : BSTRE4;
- NI float UI_RenderTargetStrength32 : BSTRE5;
- NI float UI_RenderTargetStrength16 : BSTRE6;
- #if ENBALE_BLOOM_TINTING
- NI float3 UI_RenderTargetTint1024 : BTINT0;
- NI float3 UI_RenderTargetTint512 : BTINT1;
- NI float3 UI_RenderTargetTint256 : BTINT2;
- NI float3 UI_RenderTargetTint128 : BTINT3;
- NI float3 UI_RenderTargetTint64 : BTINT4;
- NI float3 UI_RenderTargetTint32 : BTINT5;
- NI float3 UI_RenderTargetTint16 : BTINT6;
- #endif
- };
- //----------------------------------------------------------------------------------------------//
- // Variables and Macros //
- // //
- //----------------------------------------------------------------------------------------------//
- //Maximum allowed output HDR brightness
- #define MAXHDR 16384.0
- //Hardcoded resolutions for bicubic filtering and render scaling - DON'T CHANGE!
- #define MAX_BLOOM_RENDER_RES 1024.0
- #define OUTPUTRES float2(1024, 1024)
- //Maximum loop limit per pass (only change it if you know what you're doing)
- #define MAXLOOP 30
- //Global variable for gaussian weight calculation
- static const float SqrtTwoPI = sqrt(2.0 * PI);
- //Array for the different quality level multipliers [VERYHIGH, HIGH, MEDIUM, LOW]
- static const float QualityLevel[4] = {1.8, 1.6, 1.2, 1.0};
- //----------------------------------------------------------------------------------------------//
- // Shaders //
- // //
- //----------------------------------------------------------------------------------------------//
- //--------------------------------------------Prepass-------------------------------------------//
- VertexShaderOutputPrePass VS_BloomPrePass(VertexShaderInput IN)
- {
- VertexShaderOutputPrePass OUT;
- OUT.pos = float4(IN.pos.xyz,1.0);
- OUT.texcoord.xy = IN.txcoord.xy;
- #if UI_SEP_MODE_PRE == 1
- #if BLOOM_PREPASS_STYLE == 1
- OUT.UI_InBlack = TODIE_SEPARATION(UI_InBlack);
- OUT.UI_InWhite = TODIE_SEPARATION(UI_InWhite);
- OUT.UI_OutBlack = TODIE_SEPARATION(UI_OutBlack);
- OUT.UI_OutWhite = TODIE_SEPARATION(UI_OutWhite);
- OUT.UI_Saturation = TODIE_SEPARATION(UI_Saturation);
- #elif BLOOM_PREPASS_STYLE == 2
- OUT.UI_Brightness = TODIE_SEPARATION(UI_Brightness);
- OUT.UI_Contrast = TODIE_SEPARATION(UI_Contrast);
- OUT.UI_Saturation = TODIE_SEPARATION(UI_Saturation);
- OUT.UI_ThresholdLower = TODIE_SEPARATION(UI_ThresholdLower);
- OUT.UI_ThresholdUpper = TODIE_SEPARATION(UI_ThresholdUpper);
- #endif //BLOOM_PREPASS_STYLE
- #if ENABLE_SKIN_ATTENUATION
- OUT.UI_SkinAttenu = TODIE_SEPARATION(UI_SkinAttenu);
- #endif
- #elif UI_SEP_MODE_PRE == 2
- #if BLOOM_PREPASS_STYLE == 1
- OUT.UI_InBlack = DNI_SEPARATION(UI_InBlack);
- OUT.UI_InWhite = DNI_SEPARATION(UI_InWhite);
- OUT.UI_OutBlack = DNI_SEPARATION(UI_OutBlack);
- OUT.UI_OutWhite = DNI_SEPARATION(UI_OutWhite);
- OUT.UI_Saturation = DNI_SEPARATION(UI_Saturation);
- #elif BLOOM_PREPASS_STYLE == 2
- OUT.UI_Brightness = DNI_SEPARATION(UI_Brightness);
- OUT.UI_Contrast = DNI_SEPARATION(UI_Contrast);
- OUT.UI_Saturation = DNI_SEPARATION(UI_Saturation);
- OUT.UI_ThresholdLower = DNI_SEPARATION(UI_ThresholdLower);
- OUT.UI_ThresholdUpper = DNI_SEPARATION(UI_ThresholdUpper);
- #endif //BLOOM_PREPASS_STYLE
- #if ENABLE_SKIN_ATTENUATION
- OUT.UI_SkinAttenu = DNI_SEPARATION(UI_SkinAttenu);
- #endif
- #endif //UI_SEP_MODE_PRE
- return OUT;
- }
- float4 PS_BloomPrePass(VertexShaderOutputPrePass IN) : SV_Target
- {
- float3 Bloom = TextureDownsampled.Sample(Linear_Sampler, IN.texcoord);
- //Use prepass alpha mask to attenuate bloom from skins
- #if ENABLE_SKIN_ATTENUATION
- float SkinMask = TextureOriginal.Sample(Linear_Sampler, IN.texcoord).a;
- Bloom *= lerp(1.0, IN.UI_SkinAttenu, saturate(1.0 - SkinMask));
- #endif
- //Seperate luma and chroma to prevent hue/saturation shifting
- float BloomLuma = dot(Bloom.rgb, K_LUM);
- float3 BloomChroma = Bloom.rgb / BloomLuma;
- #if BLOOM_PREPASS_STYLE == 1 //Levels prepass variant
- BloomLuma = zerolim(BloomLuma - IN.UI_InBlack) / deltalim(IN.UI_InWhite - IN.UI_InBlack);
- BloomLuma = mad(deltalim(IN.UI_OutWhite - IN.UI_OutBlack), BloomLuma, IN.UI_OutBlack);
- Bloom.rgb = zerolim(lerp(BloomLuma, BloomLuma * BloomChroma, IN.UI_Saturation));
- #elif BLOOM_PREPASS_STYLE == 2 //Thresholds prepass variant
- BloomLuma = mad(BloomLuma, IN.UI_Brightness, 0.18) - 0.18 * IN.UI_Contrast;
- Bloom.rgb = zerolim(lerp(BloomLuma, BloomLuma * BloomChroma, IN.UI_Saturation));
- [branch]
- if(UI_Smooth_Threshold) Bloom.rgb *= smoothstep(IN.UI_ThresholdLower, IN.UI_ThresholdUpper, BloomLuma);
- else Bloom.rgb *= LinearStep(IN.UI_ThresholdLower, IN.UI_ThresholdUpper, BloomLuma);
- #endif //BLOOM_PREPASS_STYLE
- #if ENABLE_SOURCE_MASKING
- return float4(Bloom.rgb, dot(Bloom, K_LUM));
- #else
- return float4(Bloom.rgb, 1.0);
- #endif
- }
- //-----------------------------------Main Bloom Pass - Dynamic------------------------------------//
- VertexShaderOutputMain VS_GaussBloomMainDynamic(VertexShaderInput IN, uniform float TexSize,
- uniform bool Hori,
- uniform float MaxLoop)
- {
- VertexShaderOutputMain OUT;
- //Horizontal mode: Scales down the entire screen to the resolution of the next rendertarget
- //Vertical mode: Scales texture coordinates to the new screen size
- // -> without scaling, lower res rendertargets will have a fullres
- // horizontal blur and waste performance that way
- float2 Transform; Transform.x = MAX_BLOOM_RENDER_RES / TexSize;
- Transform.y = (Transform.x - 1.0) / Transform.x;
- //Screen quad and texcoord scaling
- OUT.pos.xy = Hori ? IN.pos.xy / Transform.x + float2(-Transform.y, Transform.y) : IN.pos.xy;
- OUT.pos.zw = float2(IN.pos.z, 1.0);
- OUT.texcoord.xy = Hori ? IN.txcoord.xy : IN.txcoord.xy / Transform.x;
- //Pixelsize scaling and screen boundary computation
- OUT.ScaledPixelSize = rcp(TexSize) * (Hori ? float2(1.0, 0.0) : float2(0.0, ScreenSize.z / Transform.x));
- OUT.NewScreenSize = (Hori ? 1.0 : rcp(Transform.x)) + float4(-OUT.ScaledPixelSize, OUT.ScaledPixelSize);
- OUT.ScaledPixelSize *= min(Transform.x / 4.0, 2.0);
- #if UI_SEP_MODE_MAIN == 1
- OUT.Sigma = TODIE_SEPARATION(UI_Sigma);
- float UI_HoriIntensity = TODIE_SEPARATION(UI_HoriIntensity);
- float UI_VertIntensity = TODIE_SEPARATION(UI_VertIntensity);
- #elif UI_SEP_MODE_MAIN == 2
- OUT.Sigma = DNI_SEPARATION(UI_Sigma);
- float UI_HoriIntensity = DNI_SEPARATION(UI_HoriIntensity);
- float UI_VertIntensity = DNI_SEPARATION(UI_VertIntensity);
- #endif //UI_SEP_MODE_MAIN
- //Skips pixel shader of low res rendertargets when bloom sigma is too small
- // -> saves performance and helps against aliasing artifacts
- OUT.SkipPS = 0.0 > (max(OUT.Sigma, 1.0) - pow(Transform.x, 0.2));
- if(!OUT.SkipPS)
- {
- OUT.Sigma = min(OUT.Sigma, MaxLoop - 1.5);
- OUT.Intensity = Hori ? UI_HoriIntensity : UI_VertIntensity;
- OUT.Hori = Hori;
- #if ENABLE_DEPTH_TESTING
- OUT.origtexcoord = IN.txcoord.xy;
- #else
- OUT.WeightFactor = rcp(OUT.Sigma * SqrtTwoPI);
- OUT.LoopCount = ceil(OUT.Sigma * QualityLevel[UI_Quality+1]);
- OUT.LoopCount = min(OUT.LoopCount, MAXLOOP);
- OUT.Sigma = -rcp(OUT.Sigma * OUT.Sigma);
- #endif
- }
- return OUT;
- }
- float4 PS_GaussBloomMainDynamic(VertexShaderOutputMain IN, uniform Texture2D InputTex, uniform bool HQ_Pass) : SV_Target
- {
- if(IN.SkipPS) return 0.0; //Don't use clip operation!
- #if ENABLE_DEPTH_TESTING
- bool EnableDepthTesting = UI_Depth_Calc && !EInteriorFactor && HQ_Pass;
- float Depth = 1.0;
- //Simple depth test to manipulate bloom sigma and intensity
- [branch] if(EnableDepthTesting)
- {
- Depth = TextureDepth.Sample(Linear_Sampler, IN.origtexcoord).x;
- Depth = FastLinDepth(Depth, UI_FarDepth);
- Depth = abs(UI_DepthInvert - Depth) + 1.0;
- IN.Sigma = lerp(IN.Sigma, IN.Sigma * Depth, UI_DepthWidth);
- }
- IN.WeightFactor = rcp(IN.Sigma * SqrtTwoPI);
- IN.LoopCount = ceil(IN.Sigma * QualityLevel[UI_Quality+1]);
- IN.LoopCount = min(IN.LoopCount, MAXLOOP);
- IN.Sigma = -rcp(IN.Sigma * IN.Sigma);
- #endif
- //Gaussian based bloom/blur with realtime adjustable kernel
- float3 Bloom = IN.WeightFactor * InputTex.Sample(Linear_Sampler, IN.texcoord).rgb;
- float WeightSum = IN.WeightFactor;
- [loop] for(float i=1.0; i <= IN.LoopCount; i++)
- {
- float4 Offset = IN.texcoord.xyxy + IN.ScaledPixelSize.xyxy * float4(i.xx, -i.xx);
- #if ENABLE_AGRESSIVE_BORDER_CORRECTION
- //Fixes wrongly weighted pixels at screen borders by ignoring out of bound samples
- float2 GaussWeight = IN.WeightFactor * exp(i*i*IN.Sigma);
- float2 OffsetTest = IN.Hori ? Offset.xz : Offset.yw;
- GaussWeight *= ceil(OffsetTest - DELTA) * abs(floor(OffsetTest - IN.NewScreenSize.yw));
- Bloom += GaussWeight.x * InputTex.SampleLevel(Linear_Sampler, Offset.xy, 0).rgb;
- Bloom += GaussWeight.y * InputTex.SampleLevel(Linear_Sampler, Offset.zw, 0).rgb;
- WeightSum += GaussWeight.x + GaussWeight.y;
- #else
- //Fixes pixels at the new screen borders by clamping offset coords to the new size
- float GaussWeight = IN.WeightFactor * exp(i*i*IN.Sigma);
- Offset = saturate(min(Offset, IN.NewScreenSize));
- Bloom += GaussWeight * InputTex.SampleLevel(Linear_Sampler, Offset.xy, 0).rgb;
- Bloom += GaussWeight * InputTex.SampleLevel(Linear_Sampler, Offset.zw, 0).rgb;
- WeightSum += GaussWeight * 2.0;
- #endif
- }
- Bloom /= WeightSum;
- #if ENABLE_DEPTH_TESTING
- [branch] if(EnableDepthTesting)
- Bloom *= lerp(IN.Intensity, IN.Intensity * Depth, UI_DepthInt); else
- #endif
- Bloom *= IN.Intensity;
- return float4(Bloom, 1.0);
- }
- //----------------------------------------SourceGrab Pass---------------------------------------//
- #if ENABLE_SOURCE_MASKING
- //Grab and write bloomsource at half screen res to the rendertarget
- VertexShaderOutputBasic VS_GrabSource (VertexShaderInput IN)
- {
- VertexShaderOutputBasic OUT;
- OUT.pos.xy = IN.pos.xy * 0.5 + float2(-0.5, 0.5);
- OUT.pos.zw = float2(IN.pos.z, 1.0);
- OUT.texcoord.xy = IN.txcoord.xy;
- return OUT;
- }
- float4 PS_GrabSource(VertexShaderOutputBasic IN) : SV_Target
- {
- if(UI_Mask_BloomSource) return TextureColor.Sample(Linear_Sampler, IN.texcoord);
- else return 0.0;
- }
- #endif
- //----------------------------------------Bloom Mix Pass----------------------------------------//
- VertexShaderOutputMix VS_BloomMix(VertexShaderInput IN)
- {
- VertexShaderOutputMix OUT;
- OUT.pos = float4(IN.pos.xyz,1.0);
- OUT.texcoord.xy = IN.txcoord.xy;
- #if ENABLE_DIRT_REFLECTION
- OUT.DirtCoords = AtlasFetch_4(IN.txcoord, UI_DirtSelect);
- #endif
- #if ENABLE_AUTOMATIC_WEIGHTING
- #if UI_SEP_MODE_MIX == 1
- float UI_AutoWeight_Bias = TODIE_SEPARATION(UI_AutoWeight_Bias);
- #elif UI_SEP_MODE_MIX == 2
- float UI_AutoWeight_Bias = DNI_SEPARATION(UI_AutoWeight_Bias);
- #endif
- float PassStrength[7];
- float WeightFactor = rcp(UI_AutoWeight_Bias * SqrtTwoPI);
- float Sigma = rcp(UI_AutoWeight_Bias * UI_AutoWeight_Bias);
- [unroll] for(int i=0; i<7; i++)
- PassStrength[i] = WeightFactor * exp(i*i*-Sigma);
- OUT.UI_RenderTargetStrength1024 = PassStrength[0];
- OUT.UI_RenderTargetStrength512 = PassStrength[1];
- OUT.UI_RenderTargetStrength256 = PassStrength[2];
- OUT.UI_RenderTargetStrength128 = PassStrength[3];
- OUT.UI_RenderTargetStrength64 = PassStrength[4];
- OUT.UI_RenderTargetStrength32 = PassStrength[5];
- OUT.UI_RenderTargetStrength16 = PassStrength[6];
- #else
- #if UI_SEP_MODE_MIX == 1
- OUT.UI_RenderTargetStrength1024 = TODIE_SEPARATION(UI_RenderTargetStrength1024);
- OUT.UI_RenderTargetStrength512 = TODIE_SEPARATION(UI_RenderTargetStrength512);
- OUT.UI_RenderTargetStrength256 = TODIE_SEPARATION(UI_RenderTargetStrength256);
- OUT.UI_RenderTargetStrength128 = TODIE_SEPARATION(UI_RenderTargetStrength128);
- OUT.UI_RenderTargetStrength64 = TODIE_SEPARATION(UI_RenderTargetStrength64);
- OUT.UI_RenderTargetStrength32 = TODIE_SEPARATION(UI_RenderTargetStrength32);
- OUT.UI_RenderTargetStrength16 = TODIE_SEPARATION(UI_RenderTargetStrength16);
- #elif UI_SEP_MODE_MIX == 2
- OUT.UI_RenderTargetStrength1024 = DNI_SEPARATION(UI_RenderTargetStrength1024);
- OUT.UI_RenderTargetStrength512 = DNI_SEPARATION(UI_RenderTargetStrength512);
- OUT.UI_RenderTargetStrength256 = DNI_SEPARATION(UI_RenderTargetStrength256);
- OUT.UI_RenderTargetStrength128 = DNI_SEPARATION(UI_RenderTargetStrength128);
- OUT.UI_RenderTargetStrength64 = DNI_SEPARATION(UI_RenderTargetStrength64);
- OUT.UI_RenderTargetStrength32 = DNI_SEPARATION(UI_RenderTargetStrength32);
- OUT.UI_RenderTargetStrength16 = DNI_SEPARATION(UI_RenderTargetStrength16);
- #endif //UI_SEP_MODE_MIX
- #endif //ENABLE_AUTOMATIC_WEIGHTING
- #if ENBALE_BLOOM_TINTING
- #if UI_SEP_MODE_MIX == 1
- OUT.UI_RenderTargetTint1024 = TODIE_SEPARATION(UI_RenderTargetTint1024);
- OUT.UI_RenderTargetTint512 = TODIE_SEPARATION(UI_RenderTargetTint512);
- OUT.UI_RenderTargetTint256 = TODIE_SEPARATION(UI_RenderTargetTint256);
- OUT.UI_RenderTargetTint128 = TODIE_SEPARATION(UI_RenderTargetTint128);
- OUT.UI_RenderTargetTint64 = TODIE_SEPARATION(UI_RenderTargetTint64);
- OUT.UI_RenderTargetTint32 = TODIE_SEPARATION(UI_RenderTargetTint32);
- OUT.UI_RenderTargetTint16 = TODIE_SEPARATION(UI_RenderTargetTint16);
- #elif UI_SEP_MODE_MIX == 2
- OUT.UI_RenderTargetTint1024 = DNI_SEPARATION(UI_RenderTargetTint1024);
- OUT.UI_RenderTargetTint512 = DNI_SEPARATION(UI_RenderTargetTint512);
- OUT.UI_RenderTargetTint256 = DNI_SEPARATION(UI_RenderTargetTint256);
- OUT.UI_RenderTargetTint128 = DNI_SEPARATION(UI_RenderTargetTint128);
- OUT.UI_RenderTargetTint64 = DNI_SEPARATION(UI_RenderTargetTint64);
- OUT.UI_RenderTargetTint32 = DNI_SEPARATION(UI_RenderTargetTint32);
- OUT.UI_RenderTargetTint16 = DNI_SEPARATION(UI_RenderTargetTint16);
- #endif //UI_SEP_MODE_MIX
- OUT.UI_RenderTargetTint1024 = ColorToChroma(OUT.UI_RenderTargetTint1024);
- OUT.UI_RenderTargetTint512 = ColorToChroma(OUT.UI_RenderTargetTint512);
- OUT.UI_RenderTargetTint256 = ColorToChroma(OUT.UI_RenderTargetTint256);
- OUT.UI_RenderTargetTint128 = ColorToChroma(OUT.UI_RenderTargetTint128);
- OUT.UI_RenderTargetTint64 = ColorToChroma(OUT.UI_RenderTargetTint64);
- OUT.UI_RenderTargetTint32 = ColorToChroma(OUT.UI_RenderTargetTint32);
- OUT.UI_RenderTargetTint16 = ColorToChroma(OUT.UI_RenderTargetTint16);
- #endif //ENBALE_BLOOM_TINTING
- //Check if RenderTarget got skipped (helps with normalization later)
- OUT.UI_RenderTargetStrength1024 *= RenderTarget1024.Load(0).a;
- OUT.UI_RenderTargetStrength512 *= RenderTarget512. Load(0).a;
- OUT.UI_RenderTargetStrength256 *= RenderTarget256. Load(0).a;
- OUT.UI_RenderTargetStrength128 *= RenderTarget128. Load(0).a;
- OUT.UI_RenderTargetStrength64 *= RenderTarget64. Load(0).a;
- OUT.UI_RenderTargetStrength32 *= RenderTarget32. Load(0).a;
- OUT.UI_RenderTargetStrength16 *= RenderTarget16. Load(0).a;
- return OUT;
- }
- float4 PS_BloomMix(VertexShaderOutputMix IN) : SV_Target
- {
- float3 Bloom, Bloom1024, Bloom512, Bloom256, Bloom128, Bloom64, Bloom32, Bloom16;
- #if USE_BICUBIC_FILTERING
- Bloom1024 = RenderTarget1024.Sample(Linear_Sampler, IN.texcoord).rgb * IN.UI_RenderTargetStrength1024;
- Bloom512 = BicubicFilter(RenderTarget512, IN.texcoord, OUTPUTRES).rgb * IN.UI_RenderTargetStrength512;
- Bloom256 = BicubicFilter(RenderTarget256, IN.texcoord, OUTPUTRES).rgb * IN.UI_RenderTargetStrength256;
- Bloom128 = BicubicFilter(RenderTarget128, IN.texcoord, OUTPUTRES).rgb * IN.UI_RenderTargetStrength128;
- Bloom64 = BicubicFilter(RenderTarget64, IN.texcoord, OUTPUTRES).rgb * IN.UI_RenderTargetStrength64;
- Bloom32 = BicubicFilter(RenderTarget32, IN.texcoord, OUTPUTRES).rgb * IN.UI_RenderTargetStrength32;
- Bloom16 = BicubicFilter(RenderTarget16, IN.texcoord, OUTPUTRES).rgb * IN.UI_RenderTargetStrength16;
- #else
- Bloom1024 = RenderTarget1024.Sample(Linear_Sampler, IN.texcoord).rgb * IN.UI_RenderTargetStrength1024;
- Bloom512 = RenderTarget512. Sample(Linear_Sampler, IN.texcoord).rgb * IN.UI_RenderTargetStrength512;
- Bloom256 = RenderTarget256. Sample(Linear_Sampler, IN.texcoord).rgb * IN.UI_RenderTargetStrength256;
- Bloom128 = RenderTarget128. Sample(Linear_Sampler, IN.texcoord).rgb * IN.UI_RenderTargetStrength128;
- Bloom64 = RenderTarget64. Sample(Linear_Sampler, IN.texcoord).rgb * IN.UI_RenderTargetStrength64;
- Bloom32 = RenderTarget32. Sample(Linear_Sampler, IN.texcoord).rgb * IN.UI_RenderTargetStrength32;
- Bloom16 = RenderTarget16. Sample(Linear_Sampler, IN.texcoord).rgb * IN.UI_RenderTargetStrength16;
- #endif
- #if ENBALE_BLOOM_TINTING
- Bloom1024 *= IN.UI_RenderTargetTint1024;
- Bloom512 *= IN.UI_RenderTargetTint512;
- Bloom256 *= IN.UI_RenderTargetTint256;
- Bloom128 *= IN.UI_RenderTargetTint128;
- Bloom64 *= IN.UI_RenderTargetTint64;
- Bloom32 *= IN.UI_RenderTargetTint32;
- Bloom16 *= IN.UI_RenderTargetTint16;
- #endif
- #if ENABLE_TOOLS
- [branch] switch (UI_PASSOUTPUT)
- {
- case 1: return float4(clamp(Bloom1024,0.0,MAXHDR),1.0);
- case 2: return float4(clamp(Bloom512, 0.0,MAXHDR),1.0);
- case 3: return float4(clamp(Bloom256, 0.0,MAXHDR),1.0);
- case 4: return float4(clamp(Bloom128, 0.0,MAXHDR),1.0);
- case 5: return float4(clamp(Bloom64, 0.0,MAXHDR),1.0);
- case 6: return float4(clamp(Bloom32, 0.0,MAXHDR),1.0);
- case 7: return float4(clamp(Bloom16, 0.0,MAXHDR),1.0);
- default: break; //case 0
- }
- #if ENABLE_DEPTH_TESTING
- [branch] if (UI_Visualize_Depth)
- {
- float Depth = TextureDepth.Sample(Linear_Sampler, IN.texcoord).x;
- Depth = FastLinDepth(Depth, UI_FarDepth);
- return abs(UI_DepthInvert - Depth) + 1.0;
- }
- #endif //ENABLE_DEPTH_TESTING
- #endif //ENABLE_TOOLS
- Bloom = Bloom1024 + Bloom512 + Bloom256 + Bloom128 + Bloom64 + Bloom32 + Bloom16;
- if(UI_Normalize_BloomSum)
- Bloom /= IN.UI_RenderTargetStrength1024 + IN.UI_RenderTargetStrength512 +
- IN.UI_RenderTargetStrength256 + IN.UI_RenderTargetStrength128 +
- IN.UI_RenderTargetStrength64 + IN.UI_RenderTargetStrength32 +
- IN.UI_RenderTargetStrength16;
- #if ENABLE_TINYBLOOM
- if(UI_TinyBloom) Bloom += pow(dot(zerolim(Bloom512 - Bloom1024 * 0.5), K_LUM) * 0.5, 1.5);
- #endif
- #if ENABLE_SOURCE_MASKING
- [branch] if (UI_Mask_BloomSource)
- {
- float4 Source = RenderTargetRGBA64F.Sample(Linear_Sampler, IN.texcoord*0.5);
- Bloom = lerp (Bloom, Bloom - Source.rgb, Source.a * UI_Mask_Weight);
- }
- #endif
- #if ENABLE_DIRT_REFLECTION
- [branch] if (UI_EnableDirtRef)
- {
- float2 RefCoords = 1.0 - IN.texcoord;
- float3 DirtRef = 0.5 * (RenderTarget32.Sample(Linear_Sampler, RefCoords).rgb +
- RenderTarget16.Sample(Linear_Sampler, RefCoords).rgb);
- DirtRef += DirtRef * LensDirtAtlas.Sample(Linear_Sampler, IN.DirtCoords).rgb;
- DirtRef *= smoothstep(0.0, UI_DirtRefThresh * 30.0, dot(DirtRef, K_LUM));
- Bloom += DirtRef * UI_DirtRef * pow(length(IN.texcoord * 2.0 - 1.0), UI_DirtRefCurve);
- }
- #endif
- #if ENABLE_BLOOM_GRAIN //Simple bloom restricted grain
- [branch] if(UI_Enable_Grain)
- {
- //Grain is here to obscure banding a bit, but if you want to get rid of it more effectively
- //add dithering after mixing in the bloom texture
- float3 Grain;
- float3 TimerSeed = Timer.x * UI_GrainMotion + float3(0.01, 0.02, 0.03);
- Grain.r = RandomGauss(IN.texcoord + float2(0.0, TimerSeed.x));
- Grain.g = RandomGauss(IN.texcoord + float2(TimerSeed.y, 0.0));
- Grain.b = RandomGauss(IN.texcoord + TimerSeed.z);
- Grain = lerp(dot(Grain, N_LUM), Grain, UI_GrainSaturation);
- float GrainInt = saturate(max3(Bloom) * 4.0) * UI_GrainIntensity;
- Bloom += Grain * GrainInt - GrainInt * 0.5;
- }
- #endif
- return float4(clamp(Bloom, 0.0, MAXHDR), 1.0);
- }
- //----------------------------------------------------------------------------------------------//
- // Techniques //
- // //
- //----------------------------------------------------------------------------------------------//
- #define BLOOMTECH11(NAME, VS_VALUES, PS_VALUES) technique11 NAME { pass p0 { \
- SetVertexShader(CompileShader(vs_5_0, VS_GaussBloomMainDynamic##VS_VALUES));\
- SetPixelShader(CompileShader(ps_5_0, PS_GaussBloomMainDynamic##PS_VALUES)); } }
- #if !ENABLE_SOURCE_MASKING
- TECH11 (KitsuuneGaussianBloom <string UIName="Dynamic Multipass Bloom - Kitsuune";>, VS_BloomPrePass(), PS_BloomPrePass())
- BLOOMTECH11 (KitsuuneGaussianBloom1, (1024.0, true, 256.0), (TextureColor, true))
- BLOOMTECH11 (KitsuuneGaussianBloom2 <string RenderTarget="RenderTarget1024";>, (1024.0, false, 256.0), (TextureColor, true))
- BLOOMTECH11 (KitsuuneGaussianBloom3, (512.0, true, 128.0), (RenderTarget1024, true))
- BLOOMTECH11 (KitsuuneGaussianBloom4 <string RenderTarget="RenderTarget512";>, (512.0, false, 128.0), (TextureColor, true))
- BLOOMTECH11 (KitsuuneGaussianBloom5, (256.0, true, 64.0), (RenderTarget512, false))
- BLOOMTECH11 (KitsuuneGaussianBloom6 <string RenderTarget="RenderTarget256";>, (256.0, false, 64.0), (TextureColor, false))
- BLOOMTECH11 (KitsuuneGaussianBloom7, (128.0, true, 32.0), (RenderTarget256, false))
- BLOOMTECH11 (KitsuuneGaussianBloom8 <string RenderTarget="RenderTarget128";>, (128.0, false, 32.0), (TextureColor, false))
- BLOOMTECH11 (KitsuuneGaussianBloom9, (64.0, true, 16.0), (RenderTarget128, false))
- BLOOMTECH11 (KitsuuneGaussianBloom10 <string RenderTarget="RenderTarget64";>, (64.0, false, 16.0), (TextureColor, false))
- BLOOMTECH11 (KitsuuneGaussianBloom11, (32.0, true, 8.0), (RenderTarget64, false))
- BLOOMTECH11 (KitsuuneGaussianBloom12 <string RenderTarget="RenderTarget32";>, (32.0, false, 8.0), (TextureColor, false))
- BLOOMTECH11 (KitsuuneGaussianBloom13, (16.0, true, 4.0), (RenderTarget32, false))
- BLOOMTECH11 (KitsuuneGaussianBloom14 <string RenderTarget="RenderTarget16";>, (16.0, false, 4.0), (TextureColor, false))
- TECH11 (KitsuuneGaussianBloom15, VS_BloomMix(), PS_BloomMix())
- #else
- TECH11 (KitsuuneGaussianBloom <string UIName="Dynamic Multipass Bloom - Kitsuune";>, VS_BloomPrePass(), PS_BloomPrePass())
- TECH11 (KitsuuneGaussianBloom1 <string RenderTarget="RenderTargetRGBA64F";>, VS_GrabSource(), PS_GrabSource())
- BLOOMTECH11 (KitsuuneGaussianBloom2, (1024.0, true, 256.0), (TextureColor, true))
- BLOOMTECH11 (KitsuuneGaussianBloom3 <string RenderTarget="RenderTarget1024";>, (1024.0, false, 256.0), (TextureColor, true))
- BLOOMTECH11 (KitsuuneGaussianBloom4, (512.0, true, 128.0), (RenderTarget1024, true))
- BLOOMTECH11 (KitsuuneGaussianBloom5 <string RenderTarget="RenderTarget512";>, (512.0, false, 128.0), (TextureColor, true))
- BLOOMTECH11 (KitsuuneGaussianBloom6, (256.0, true, 64.0), (RenderTarget512, false))
- BLOOMTECH11 (KitsuuneGaussianBloom7 <string RenderTarget="RenderTarget256";>, (256.0, false, 64.0), (TextureColor, false))
- BLOOMTECH11 (KitsuuneGaussianBloom8, (128.0, true, 32.0), (RenderTarget256, false))
- BLOOMTECH11 (KitsuuneGaussianBloom9 <string RenderTarget="RenderTarget128";>, (128.0, false, 32.0), (TextureColor, false))
- BLOOMTECH11 (KitsuuneGaussianBloom10, (64.0, true, 16.0), (RenderTarget128, false))
- BLOOMTECH11 (KitsuuneGaussianBloom11 <string RenderTarget="RenderTarget64";>, (64.0, false, 16.0), (TextureColor, false))
- BLOOMTECH11 (KitsuuneGaussianBloom12, (32.0, true, 8.0), (RenderTarget64, false))
- BLOOMTECH11 (KitsuuneGaussianBloom13 <string RenderTarget="RenderTarget32";>, (32.0, false, 8.0), (TextureColor, false))
- BLOOMTECH11 (KitsuuneGaussianBloom14, (16.0, true, 4.0), (RenderTarget32, false))
- BLOOMTECH11 (KitsuuneGaussianBloom15 <string RenderTarget="RenderTarget16";>, (16.0, false, 4.0), (TextureColor, false))
- TECH11 (KitsuuneGaussianBloom16, VS_BloomMix(), PS_BloomMix())
- #endif
Advertisement
Add Comment
Please, Sign In to add comment