2016-01-07 08:17:16 -05:00
|
|
|
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
2015-07-09 11:47:06 -04:00
|
|
|
|
|
|
|
|
/*=============================================================================
|
|
|
|
|
PostProcessDOF.cpp: Post process Depth of Field implementation.
|
|
|
|
|
=============================================================================*/
|
|
|
|
|
|
|
|
|
|
#include "RendererPrivate.h"
|
|
|
|
|
#include "ScenePrivate.h"
|
|
|
|
|
#include "SceneFilterRendering.h"
|
|
|
|
|
#include "PostProcessBokehDOF.h"
|
|
|
|
|
#include "PostProcessCircleDOF.h"
|
|
|
|
|
#include "PostProcessing.h"
|
|
|
|
|
#include "SceneUtils.h"
|
|
|
|
|
|
2015-10-28 08:58:16 -04:00
|
|
|
static TAutoConsoleVariable<int32> CVarDepthOfFieldFarBlur(
|
|
|
|
|
TEXT("r.DepthOfField.FarBlur"),
|
|
|
|
|
1,
|
|
|
|
|
TEXT("Temporary hack affecting only CircleDOF\n")
|
|
|
|
|
TEXT(" 0: Off\n")
|
|
|
|
|
TEXT(" 1: On (default)"),
|
|
|
|
|
ECVF_RenderThreadSafe);
|
|
|
|
|
|
2015-07-09 11:47:06 -04:00
|
|
|
|
|
|
|
|
float ComputeFocalLengthFromFov(const FSceneView& View)
|
|
|
|
|
{
|
|
|
|
|
// Convert FOV to focal length,
|
|
|
|
|
//
|
|
|
|
|
// fov = 2 * atan(d/(2*f))
|
|
|
|
|
// where,
|
|
|
|
|
// d = sensor dimension (APS-C 24.576 mm)
|
|
|
|
|
// f = focal length
|
|
|
|
|
//
|
|
|
|
|
// f = 0.5 * d * (1/tan(fov/2))
|
2016-03-08 16:55:04 -05:00
|
|
|
|
|
|
|
|
float const d = View.FinalPostProcessSettings.DepthOfFieldSensorWidth;
|
|
|
|
|
float const HalfFOV = FMath::Atan(1.0f / View.ViewMatrices.ProjMatrix.M[0][0]);
|
|
|
|
|
float const FocalLength = 0.5f * d * (1.0f/FMath::Tan(HalfFOV));
|
2015-07-09 11:47:06 -04:00
|
|
|
|
|
|
|
|
return FocalLength;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Convert f-stop and focal distance into projected size in half resolution pixels.
|
|
|
|
|
// Setup depth based blur.
|
2015-10-31 10:55:13 -04:00
|
|
|
FVector4 CircleDofHalfCoc(const FSceneView& View)
|
2015-07-09 11:47:06 -04:00
|
|
|
{
|
2015-10-31 10:55:13 -04:00
|
|
|
static const auto CVar = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.DepthOfFieldQuality"));
|
|
|
|
|
bool bDepthOfField = View.Family->EngineShowFlags.DepthOfField && CVar->GetValueOnRenderThread() > 0;
|
|
|
|
|
|
|
|
|
|
FVector4 Ret(0, 1, 0, 0);
|
|
|
|
|
|
|
|
|
|
if(bDepthOfField && View.FinalPostProcessSettings.DepthOfFieldMethod == DOFM_CircleDOF)
|
|
|
|
|
{
|
|
|
|
|
float FocalLengthInMM = ComputeFocalLengthFromFov(View);
|
2015-07-09 11:47:06 -04:00
|
|
|
|
2015-10-31 10:55:13 -04:00
|
|
|
// Convert focal distance in world position to mm (from cm to mm)
|
|
|
|
|
float FocalDistanceInMM = View.FinalPostProcessSettings.DepthOfFieldFocalDistance * 10.0f;
|
2015-07-09 11:47:06 -04:00
|
|
|
|
2015-10-31 10:55:13 -04:00
|
|
|
// Convert f-stop, focal length, and focal distance to
|
|
|
|
|
// projected circle of confusion size at infinity in mm.
|
|
|
|
|
//
|
|
|
|
|
// coc = f * f / (n * (d - f))
|
|
|
|
|
// where,
|
|
|
|
|
// f = focal length
|
|
|
|
|
// d = focal distance
|
|
|
|
|
// n = fstop (where n is the "n" in "f/n")
|
|
|
|
|
float Radius = FMath::Square(FocalLengthInMM) / (View.FinalPostProcessSettings.DepthOfFieldFstop * (FocalDistanceInMM - FocalLengthInMM));
|
2015-07-09 11:47:06 -04:00
|
|
|
|
2015-10-31 10:55:13 -04:00
|
|
|
// Convert mm to pixels.
|
2016-03-08 16:55:04 -05:00
|
|
|
float const Width = (float)View.ViewRect.Width();
|
|
|
|
|
float const SensorWidth = View.FinalPostProcessSettings.DepthOfFieldSensorWidth;
|
|
|
|
|
Radius = Radius * Width * (1.0f / SensorWidth);
|
2015-07-09 11:47:06 -04:00
|
|
|
|
2015-10-31 10:55:13 -04:00
|
|
|
// Convert diameter to radius at half resolution (algorithm radius is at half resolution).
|
|
|
|
|
Radius *= 0.25f;
|
2015-07-09 11:47:06 -04:00
|
|
|
|
2015-10-31 10:55:13 -04:00
|
|
|
// Comment out for now, allowing settings which the algorithm cannot cleanly do.
|
|
|
|
|
#if 0
|
|
|
|
|
// Limit to algorithm max size.
|
|
|
|
|
if(Radius > 6.0f)
|
|
|
|
|
{
|
|
|
|
|
Radius = 6.0f;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
2015-07-09 11:47:06 -04:00
|
|
|
|
2015-10-31 10:55:13 -04:00
|
|
|
// The DepthOfFieldDepthBlurAmount = km at which depth blur is 50%.
|
|
|
|
|
// Need to convert to cm here.
|
|
|
|
|
Ret = FVector4(
|
|
|
|
|
Radius,
|
|
|
|
|
1.0f / (View.FinalPostProcessSettings.DepthOfFieldDepthBlurAmount * 100000.0f),
|
|
|
|
|
View.FinalPostProcessSettings.DepthOfFieldDepthBlurRadius * Width / 1920.0f,
|
|
|
|
|
Width / 1920.0f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Ret;
|
2015-07-09 11:47:06 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Encapsulates the Circle DOF setup pixel shader. */
|
2015-10-28 08:58:16 -04:00
|
|
|
template <uint32 FarBlurEnable>
|
2015-07-09 11:47:06 -04:00
|
|
|
class FPostProcessCircleDOFSetupPS : public FGlobalShader
|
|
|
|
|
{
|
|
|
|
|
DECLARE_SHADER_TYPE(FPostProcessCircleDOFSetupPS, Global);
|
|
|
|
|
|
|
|
|
|
static bool ShouldCache(EShaderPlatform Platform)
|
|
|
|
|
{
|
2015-07-14 14:11:35 -04:00
|
|
|
return IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM4);
|
2015-07-09 11:47:06 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void ModifyCompilationEnvironment(EShaderPlatform Platform, FShaderCompilerEnvironment& OutEnvironment)
|
|
|
|
|
{
|
|
|
|
|
FGlobalShader::ModifyCompilationEnvironment(Platform,OutEnvironment);
|
2015-10-28 08:58:16 -04:00
|
|
|
OutEnvironment.SetDefine(TEXT("ENABLE_FAR_BLUR"), FarBlurEnable);
|
2015-07-09 11:47:06 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Default constructor. */
|
|
|
|
|
FPostProcessCircleDOFSetupPS() {}
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
FPostProcessPassParameters PostprocessParameter;
|
|
|
|
|
FDeferredPixelShaderParameters DeferredParameters;
|
|
|
|
|
FShaderParameter DepthOfFieldParams;
|
|
|
|
|
|
|
|
|
|
/** Initialization constructor. */
|
|
|
|
|
FPostProcessCircleDOFSetupPS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
|
|
|
|
|
: FGlobalShader(Initializer)
|
|
|
|
|
{
|
|
|
|
|
PostprocessParameter.Bind(Initializer.ParameterMap);
|
|
|
|
|
DeferredParameters.Bind(Initializer.ParameterMap);
|
|
|
|
|
DepthOfFieldParams.Bind(Initializer.ParameterMap,TEXT("DepthOfFieldParams"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// FShader interface.
|
|
|
|
|
virtual bool Serialize(FArchive& Ar) override
|
|
|
|
|
{
|
|
|
|
|
bool bShaderHasOutdatedParameters = FGlobalShader::Serialize(Ar);
|
2015-10-31 10:55:13 -04:00
|
|
|
Ar << PostprocessParameter << DeferredParameters << DepthOfFieldParams;
|
2015-07-09 11:47:06 -04:00
|
|
|
return bShaderHasOutdatedParameters;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SetParameters(const FRenderingCompositePassContext& Context)
|
|
|
|
|
{
|
|
|
|
|
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
|
|
|
|
|
|
|
|
|
|
FGlobalShader::SetParameters(Context.RHICmdList, ShaderRHI, Context.View);
|
|
|
|
|
|
|
|
|
|
PostprocessParameter.SetPS(ShaderRHI, Context, TStaticSamplerState<SF_Point,AM_Border,AM_Border,AM_Clamp>::GetRHI());
|
|
|
|
|
|
|
|
|
|
DeferredParameters.Set(Context.RHICmdList, ShaderRHI, Context.View);
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
FVector4 DepthOfFieldParamValues[2];
|
|
|
|
|
|
|
|
|
|
FRCPassPostProcessBokehDOF::ComputeDepthOfFieldParams(Context, DepthOfFieldParamValues);
|
|
|
|
|
|
|
|
|
|
SetShaderValueArray(Context.RHICmdList, ShaderRHI, DepthOfFieldParams, DepthOfFieldParamValues, 2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
IMPLEMENT_SHADER_TYPE(template<>,FPostProcessCircleDOFSetupPS<0>,TEXT("PostProcessCircleDOF"),TEXT("CircleSetupPS"),SF_Pixel);
|
|
|
|
|
IMPLEMENT_SHADER_TYPE(template<>,FPostProcessCircleDOFSetupPS<1>,TEXT("PostProcessCircleDOF"),TEXT("CircleSetupPS"),SF_Pixel);
|
|
|
|
|
|
|
|
|
|
void FRCPassPostProcessCircleDOFSetup::Process(FRenderingCompositePassContext& Context)
|
|
|
|
|
{
|
|
|
|
|
SCOPED_DRAW_EVENT(Context.RHICmdList, CircleDOFSetup);
|
|
|
|
|
|
|
|
|
|
const FPooledRenderTargetDesc* InputDesc = GetInputDesc(ePId_Input0);
|
|
|
|
|
|
|
|
|
|
if(!InputDesc)
|
|
|
|
|
{
|
|
|
|
|
// input is not hooked up correctly
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint32 NumRenderTargets = bNearBlurEnabled ? 2 : 1;
|
|
|
|
|
|
|
|
|
|
const FSceneView& View = Context.View;
|
|
|
|
|
const FSceneViewFamily& ViewFamily = *(View.Family);
|
|
|
|
|
|
|
|
|
|
const auto FeatureLevel = Context.GetFeatureLevel();
|
|
|
|
|
auto ShaderMap = Context.GetShaderMap();
|
|
|
|
|
|
|
|
|
|
FIntPoint SrcSize = InputDesc->Extent;
|
|
|
|
|
FIntPoint DestSize = PassOutputs[0].RenderTargetDesc.Extent;
|
|
|
|
|
|
|
|
|
|
// e.g. 4 means the input texture is 4x smaller than the buffer size
|
|
|
|
|
uint32 ScaleFactor = FSceneRenderTargets::Get(Context.RHICmdList).GetBufferSizeXY().X / SrcSize.X;
|
|
|
|
|
|
|
|
|
|
FIntRect SrcRect = View.ViewRect / ScaleFactor;
|
|
|
|
|
FIntRect DestRect = SrcRect / 2;
|
|
|
|
|
|
|
|
|
|
const FSceneRenderTargetItem& DestRenderTarget0 = PassOutputs[0].RequestSurface(Context);
|
|
|
|
|
const FSceneRenderTargetItem& DestRenderTarget1 = bNearBlurEnabled ? PassOutputs[1].RequestSurface(Context) : FSceneRenderTargetItem();
|
|
|
|
|
|
|
|
|
|
// Set the view family's render target/viewport.
|
|
|
|
|
FTextureRHIParamRef RenderTargets[2] =
|
|
|
|
|
{
|
|
|
|
|
DestRenderTarget0.TargetableTexture,
|
|
|
|
|
DestRenderTarget1.TargetableTexture
|
|
|
|
|
};
|
|
|
|
|
SetRenderTargets(Context.RHICmdList, NumRenderTargets, RenderTargets, FTextureRHIParamRef(), 0, NULL);
|
|
|
|
|
|
|
|
|
|
FLinearColor ClearColors[2] =
|
|
|
|
|
{
|
|
|
|
|
FLinearColor(0, 0, 0, 0),
|
|
|
|
|
FLinearColor(0, 0, 0, 0)
|
|
|
|
|
};
|
|
|
|
|
// is optimized away if possible (RT size=view size, )
|
|
|
|
|
Context.RHICmdList.ClearMRT(true, NumRenderTargets, ClearColors, false, 1.0f, false, 0, DestRect);
|
|
|
|
|
|
|
|
|
|
Context.SetViewportAndCallRHI(0, 0, 0.0f, DestSize.X, DestSize.Y, 1.0f );
|
|
|
|
|
|
|
|
|
|
// set the state
|
|
|
|
|
Context.RHICmdList.SetBlendState(TStaticBlendState<>::GetRHI());
|
|
|
|
|
Context.RHICmdList.SetRasterizerState(TStaticRasterizerState<>::GetRHI());
|
|
|
|
|
Context.RHICmdList.SetDepthStencilState(TStaticDepthStencilState<false, CF_Always>::GetRHI());
|
|
|
|
|
|
|
|
|
|
TShaderMapRef<FPostProcessVS> VertexShader(ShaderMap);
|
|
|
|
|
|
2015-10-28 08:58:16 -04:00
|
|
|
if(CVarDepthOfFieldFarBlur.GetValueOnRenderThread())
|
2015-07-09 11:47:06 -04:00
|
|
|
{
|
|
|
|
|
static FGlobalBoundShaderState BoundShaderState;
|
|
|
|
|
|
|
|
|
|
TShaderMapRef< FPostProcessCircleDOFSetupPS<1> > PixelShader(ShaderMap);
|
|
|
|
|
SetGlobalBoundShaderState(Context.RHICmdList, FeatureLevel, BoundShaderState, GFilterVertexDeclaration.VertexDeclarationRHI, *VertexShader, *PixelShader);
|
|
|
|
|
|
|
|
|
|
PixelShader->SetParameters(Context);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
static FGlobalBoundShaderState BoundShaderState;
|
|
|
|
|
|
|
|
|
|
TShaderMapRef< FPostProcessCircleDOFSetupPS<0> > PixelShader(ShaderMap);
|
|
|
|
|
SetGlobalBoundShaderState(Context.RHICmdList, FeatureLevel, BoundShaderState, GFilterVertexDeclaration.VertexDeclarationRHI, *VertexShader, *PixelShader);
|
|
|
|
|
|
|
|
|
|
PixelShader->SetParameters(Context);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
VertexShader->SetParameters(Context);
|
|
|
|
|
|
2015-08-04 19:33:26 -04:00
|
|
|
DrawPostProcessPass(
|
2015-07-09 11:47:06 -04:00
|
|
|
Context.RHICmdList,
|
|
|
|
|
DestRect.Min.X, DestRect.Min.Y,
|
|
|
|
|
DestRect.Width() + 1, DestRect.Height() + 1,
|
|
|
|
|
SrcRect.Min.X, SrcRect.Min.Y,
|
|
|
|
|
SrcRect.Width() + 1, SrcRect.Height() + 1,
|
|
|
|
|
DestSize,
|
|
|
|
|
SrcSize,
|
|
|
|
|
*VertexShader,
|
2015-08-04 19:33:26 -04:00
|
|
|
View.StereoPass,
|
|
|
|
|
Context.HasHmdMesh(),
|
2015-07-09 11:47:06 -04:00
|
|
|
EDRF_UseTriangleOptimization);
|
|
|
|
|
|
|
|
|
|
Context.RHICmdList.CopyToResolveTarget(DestRenderTarget0.TargetableTexture, DestRenderTarget0.ShaderResourceTexture, false, FResolveParams());
|
Copying //UE4/Orion-Staging to //UE4/Main (Source: //Orion/Dev-General @ 2949393)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2949393 on 2016/04/20 by Graeme.Thornton
Orion non-pak file security.
- Removed security bypass code from platform pak file
- Added a delegate to pak file code which allows the game to decide whether a file should be allowed or not
- Added an orion delegate which whitelists appropriate files
#rb robert.manuszewski
#tests win64 client + dedicated server. golden path.
Change 2949232 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: michael.noland
Paragon: Added a distinct menu frame rate limit, currently set to 60 fps and not visible in settings (if the user sets a game frame rate limit of below 60, we also clamp the menu limit to that threshold, so they can go down but not up for menus)
#jira OR-18017
#rb marcus.wassmer
#tests Ran paragon and switched between gameplay, menus, and replays, observing t.MaxFPS at different points
#ROBOMERGE-SOURCE: CL 2949231 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2949032 on 2016/04/19 by Zak.Middleton
#orion - Lower default NetUpdateFrequency for minions (10->6). Avoid excessive latency for some knockback/knockup abilities that would have noticeable lag by forcing an update sooner when they are triggered.
This should have the following effects:
1. Reduce server CPU cost (we tick minions at the net frequency).
2. Reduce server bandwidth
3. Reduce client CPU cost (we move character capsules and perform overlaps when new positions are received).
#rb Bart.Bressler, John.Pollard
#codereview Dmitry.Rekman
#tests MultiPIE AI lane, Replays
Change 2948966 on 2016/04/19 by Lina.Halper
Added log (check) of the asset info for Anim Per Track contains invalid format key
#rb: Michael.Noland
#code review: Martin.Wilson, Laurent.Delayen, Michael.Noland
#tests: editor/ cooked and test with AI_Tests with 10 bots.
Change 2948876 on 2016/04/19 by Michael.Noland
PS4: Validate that the texture pool size is not set to automatic (-1, which will crash later on as an attempt to allocate too much memory)
#rb none
#codereview marcus.wassmer
#tests Ran Paragon on PS4
Change 2948765 on 2016/04/19 by Daniel.Lamb
Removed AssetImportData tag from cooked asset registry builds.
#rb Andrew.Grant
#test Cook orion
Change 2948691 on 2016/04/19 by Marcus.Wassmer
Fix copytoresolvetarget ensure
#rb none
#test pc agora
Change 2948633 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: jason.bestimt
[AUTOMERGE]
Fix copytoresolve crash and change validation to ensure.
#test PC editor / PC golden path
#rb none
--------
Integrated using branch //Orion/Main_to_//Orion/Release-Next (reversed) of change#2948169 by Marcus.Wassmer on 2016/04/19 10:50:32.
#ROBOMERGE-SOURCE: CL 2948632 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2948507 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: andrew.grant
Merging 2937781 (Pak signing) using //Orion/Dev-General_to_Release
#rb none
#tests cooked client, checked game runs
#ROBOMERGE-SOURCE: CL 2948497 in //Orion/Release-0.24.1/... via CL 2948506
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2948431 on 2016/04/19 by Steve.Robb
CL#s 2919775 and 2942793 integrated to prevent annotation map performance problems on shutdown and asserts in PIE.
#codereview robert.manuszewski,bob.tellez
#rb bob.tellez
#tests Ran editor
Change 2948408 on 2016/04/19 by Leslie.Nivison
Adding .tps
#rb none
#test none
Change 2948185 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: chris.bunner
Fix for HLOD visibility freeze.
#tests Golden Path, Editor
#rb rolando.caloca, michael.noland
#lockdown andrew.grant
#jira OR-19863
#ROBOMERGE-SOURCE: CL 2948182 in //Orion/Release-0.24.1/... via CL 2948183
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2948149 on 2016/04/19 by Simon.Tovey
Fixed crash. Collision rendering path was not dealing with mesh batch with 0 triangles where other paths do.
#rb none
#tests No more crash
#codereview Marcus.Wassmer
Change 2948129 on 2016/04/19 by Lukasz.Furman
fixed gameplay debugger getting stuck with outdated data pack on client,
changed names of AI related debug cvars
#rb none
#tests game, PIE
#codereview Mieszko.Zielinski
Change 2948027 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: graeme.thornton
Fix for OR-20033 - CRASH: Client will crash with FRCPassPostProcessCircleDOFSetup
#rb none
#tests checked game runs without crashing
#ROBOMERGE-SOURCE: CL 2948017 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2947558 on 2016/04/18 by Matt.Kuhlenschmidt
Fix compile error
#rb none, #tests none
Change 2947509 on 2016/04/18 by Matt.Kuhlenschmidt
Added more logging to track down
https://jira.ol.epicgames.net/browse/OR-19841
#rb none, #tests none
Change 2947412 on 2016/04/18 by Ryan.Gerleve
Fix shadowed variable.
#rb none
#tests none
Change 2947377 on 2016/04/18 by Jamie.Dale
Gather paths are now sorted by fuzzy-ness, so that more specific includes beat less specific excludes
#rb Matt.Kuhlenschmidt
#tests Built for Windows. Ran a gather, and confirmed that explicitly included heroes were now gathered, and that generically excluded heroes were absent from the gather.
Change 2947351 on 2016/04/18 by Ryan.Gerleve
Allow overriding the demo.AsyncLoadWorld setting with a URL option when playing a replay.
Store the entire URL in the demo net driver instead of just the map name, so that the options can be accessed later.
#tests golden path, replays
#rb john.pollard
Change 2947103 on 2016/04/18 by david.nikdel
#ROBOMERGE-AUTHOR: jason.bestimt
#ORION_MAIN - Merge 24.1 @ CL 2947071
#RB:none
#Tests:none
#ROBOMERGE-SOURCE: CL 2947102 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2947007 on 2016/04/18 by Zak.Middleton
#ue4 - Improve linear smoothing in the presence of low net frequency updates.
#rb Bart.Bressler
#tests MultiPIE AI with lanes
Change 2946994 on 2016/04/18 by Mieszko.Zielinski
Improvements to NavigationSystem's "abstract navigation data" support #UE4
#rb Lukasz.Furman
#test golden path
Change 2946760 on 2016/04/18 by Chris.Bunner
Fixing up bad merge, recommit of CL 2819472 - ForceLOD now clamps to available LODs on primitive, i.e. use MinLOD rather than not drawing at all.
#tests Editor
#rb None
Change 2946745 on 2016/04/18 by david.nikdel
#ROBOMERGE-AUTHOR: jason.bestimt
#ORION_MAIN - Merge 24.1 @ CL 2946637
#RB:none
#Tests:none
#ROBOMERGE-SOURCE: CL 2946656 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2946645 on 2016/04/18 by Richard.Fawcett
When promoting a buidl to staged, prevent enumeration of files already in S3
Enumerating files in S3 is a slow process, and it turns out that simply uploading all chunks blindly is more efficient than enumerating existing chunks and selectively uploading only the new ones.
#rb Leigh.Swift
#tests This technique has already been used in launcher promotions for several months
Change 2946622 on 2016/04/18 by Richard.Fawcett
By default, when enumerating chunks from a manifest file, skip checking they exist on disk at enumeration time.
This will fail anyway further down the line if the files don't exist, but will improve speed of stage promotions by around five minutes. In practice, we have NEVER seen a job fail at this point because of the existence check.
#rb Leigh.Swift
#tests Ensure that output of ExtractDataFilenamesFromManifest method is identical both with and without bSkipExistsCheck specified.
Change 2945812 on 2016/04/15 by Daniel.Lamb
Fixed error in diff cooked build commandlet.
#rb ben.marsh
#test Compile.
Change 2945110 on 2016/04/15 by Matt.Kuhlenschmidt
Fix crash exporting actors with non-scene components to fbx
#rb none, #tests full scene exporting on maps that crashed
#codereview alexis.matte
Change 2945078 on 2016/04/15 by Simon.Tovey
Fix for OR-19778
When some pooled systems are reused, on init they have a non zero lod level but the emitter instances are created at LOD 0 initially.
So the component did not think it had to update it's LOD but the emitters were not at the correct LOD.
Have forced a LOD set on init when the component LOD is non-zero.
#rb none
#tests Works in editor and game.
#codereview Olaf.Piesche
Change 2944664 on 2016/04/14 by Uriel.Doyon
Fix to SM4 compilation issue
#jira OR-19706
#rb marcus.wassmer
#tests tested editor in SM4 and SM5
Change 2944642 on 2016/04/14 by Lukasz.Furman
changed waypoint switch conditions in meta nav paths
#rb none
#tests PIE
#codereview Mieszko.Zielinski
Change 2944599 on 2016/04/14 by david.nikdel
#ROBOMERGE-AUTHOR: andrew.grant
Added sha1 to UnrealPak list output
#rb none
#tests listed content of pakfile
#ROBOMERGE-SOURCE: CL 2944595 in //Orion/Release-0.24/... via CL 2944597 via CL 2944598
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2944441 on 2016/04/14 by Marcus.Wassmer
Duplicate change to output shader compiler errors.
#rb none
#test run PC and see errors.
Change 2944437 on 2016/04/14 by John.Pollard
Possible fix for https://jira.ol.epicgames.net/browse/OR-19614
#rb JoshM
#codereview Josh.Markiewicz
#tests Golden path matchmaking
Change 2944430 on 2016/04/14 by david.nikdel
#ROBOMERGE-AUTHOR: michael.noland
Engine: Added support for more/fewer settings in individual categories to the editor scalability control widget
#rb david.ratti
#tests Tested in the editor
#ROBOMERGE-SOURCE: CL 2944428 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2944198 on 2016/04/14 by David.Ratti
Paragon - register for slow/stun/root/silence callbacks on any tag count change, not just add/remove. This is so the UI will update if you get another stack of a stackable slow GE.
Ability system - unify client stack count change code path with server. Client now properly update owner ASC's tag map and broadcasts all delegates there.
#rb dayY
#tests pie
Change 2944124 on 2016/04/14 by Wes.Hunt
Change the TPS redirects for DX modules to point to the proper DX redist TPS which is what packaged games will need.
#codereview:leslie.nivison
#rb none
#tests ran UAT ListThirdPartySoftware <for Orion>
Change 2944107 on 2016/04/14 by Wes.Hunt
MeshUtilities now depends on new module nvTessLib to better track the third party dependency.
#codereview:daniel.wright
#rb none
#tests build OrionClient/Editor for Win64
Change 2944102 on 2016/04/14 by Wes.Hunt
Tweak to UBT -ListBuildFolders to do a distinct in a better place to cut down on duplicate module searches.
#tests ran the UBT command
#rb none
Change 2943851 on 2016/04/14 by Ryan.Gerleve
Fix the ForEachNetDriver helper function to get the world context directly off the world instead of going through the game instance. Ensures the correct net drivers will be used when there are multiple worlds but only one game instance.
#rb john.pollard
#tests golden path, replays, PIE
Change 2943847 on 2016/04/14 by Ryan.Gerleve
Fixes to support client replay recording & playback in another world:
When recording a replay, only swap actor roles if the remote role is ROLE_Authority
When loading a replay checkpoint, call NetworkRemapPath to make sure paths have the correct name in the GuidCache
#rb john.pollard
#tests golden path, replays, PIE
Change 2943691 on 2016/04/14 by david.nikdel
#ROBOMERGE-AUTHOR: jason.bestimt
#ORION_24 - Fix for OR-19609, OR-19610, and OR-19611
#RB:none
#Tests:none
#ROBOMERGE-SOURCE: CL 2943687 in //Orion/Release-0.24/... via CL 2943688
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2943508 on 2016/04/14 by Richard.Fawcett
Automation: Add support for multipart file uploads to Amazon S3 to increase speed of large file uploads.
#jira OPPBUILD-44
#rb Leigh.Swift
#tests Uploaded files to S3 using the new routines, downlaoded via AWS management console and ensured downloaded files identical to uploaded ones
Change 2943274 on 2016/04/13 by jason.bestimt
#ORION_MAIN - Merge 24 @ CL 2943257
#RB:none
#Tests:none
#ROBOMERGE-SOURCE: CL 2943271 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
#ROBOMERGE-SAYS: Beep boop! I couldn't merge this change. Please do it yourself, human.
#CodeReview: david.nikdel, jason.bestimt
Change 2943178 on 2016/04/13 by Olaf.Piesche
Bumping size of the particle curve texture to 512x512
#rb martin.mittring
#tests PC Editor, Game
Change 2943174 on 2016/04/13 by Aaron.McLeran
OR-19392 Ensure condition failed: (*RequiresInitialization == 0) on loading into PVP match
- Removing ensure since there is a rare edge case where it's possible for a sound looping node may get ResetChildren called twice.
- Condition is when a child random node o fa looping node has a blank entry and results in no sound chosen in a given frame (which results in ResetChildren getting called). Later in the frame, if a sound had previously been playing with an active sound, it will have stop called on it, which will call NotifyWaveInstanceFinished and hit the ensure. Simply using the branch to check if the looping node has been initialized will work fine in this and other cases.
#codereview Bob.Tellez
#rb Bob.Tellez
#tests ran orion with this change testing problematic sound cue
Change 2943042 on 2016/04/13 by Rob.Cannaday
Fix crash in HTTP completion delegates on shutdown
Stop ticking HTTP retry manager after FOnlineSubsystemImpl::Shutdown has been called
#rb josh.markiewicz
#tests shutting down multiple times
Change 2942913 on 2016/04/13 by Lukasz.Furman
added meta navmesh paths
#orion
#rb Mieszko.Zielinski
#tests PIE
Change 2942132 on 2016/04/13 by Wes.Hunt
Enable UBT -ListBuildFolders to operate on Mac and iOS platforms without having to fully set up the remote environment.
#codereview:leslie.nivison
#rb peter.sauerbrei
#tests running UBT with and without -listbuildfolders
Change 2941651 on 2016/04/12 by Jason.Bestimt
#ORION_DG - Merge MAIN @ CL 2941645
#RB:none
#Tests:none
Change 2941539 on 2016/04/12 by Laurent.Delayen
FABRIK: Normalize outgoing rotations.
Fixes Chains Q ability crashing.
#rb none
#tests Chains not crashing
Change 2941469 on 2016/04/12 by Wes.Hunt
Fix UBT -ListBuildFolders to not prep target for deployment.
#codereview:leslie.nivison
#rb none
#tests tested -ListBuildFolders for Android
Change 2941434 on 2016/04/12 by Leslie.Nivison
Adding/cleaning up .tps files
#rb none
#test none
Change 2941241 on 2016/04/12 by Daniel.Lamb
Removed shadername from the shader code to fix deterministic material cooking issue.
#jira UE-29320
#codereview Marcus.Wassmer
#rb Marcus.Wassmer
#test Running editor, cooking orion.
Change 2941046 on 2016/04/12 by Laurent.Delayen
Added safety net for non state AnimNotifies having a non-zero EndTriggerTimeOffset.
Fixes Twinblast double shot for the left primary attack.
#rb benn.gallagher
#codereview lina.halper, ray.arnett, aaron.eady
#tests twinblast's LMB
Change 2941032 on 2016/04/12 by Jason.Bestimt
#ORION_24 - Merge MAIN @ CL 2940950
#RB:none
#Tests:none
[CL 2952833 by Andrew Grant in Main branch]
2016-04-22 11:21:10 -04:00
|
|
|
|
|
|
|
|
if (DestRenderTarget1.TargetableTexture)
|
|
|
|
|
{
|
|
|
|
|
Context.RHICmdList.CopyToResolveTarget(DestRenderTarget1.TargetableTexture, DestRenderTarget1.ShaderResourceTexture, false, FResolveParams());
|
|
|
|
|
}
|
2015-07-09 11:47:06 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FPooledRenderTargetDesc FRCPassPostProcessCircleDOFSetup::ComputeOutputDesc(EPassOutputId InPassOutputId) const
|
|
|
|
|
{
|
|
|
|
|
FPooledRenderTargetDesc Ret = GetInput(ePId_Input0)->GetOutput()->RenderTargetDesc;
|
|
|
|
|
|
|
|
|
|
// Ret.Extent = FIntPoint::DivideAndRoundUp(ret.Extent, 2);
|
|
|
|
|
Ret.Extent /= 2;
|
|
|
|
|
Ret.Extent.X = FMath::Max(1, Ret.Extent.X);
|
|
|
|
|
Ret.Extent.Y = FMath::Max(1, Ret.Extent.Y);
|
|
|
|
|
|
|
|
|
|
Ret.Reset();
|
|
|
|
|
Ret.TargetableFlags &= ~(uint32)TexCreate_UAV;
|
|
|
|
|
Ret.TargetableFlags |= TexCreate_RenderTargetable;
|
2015-10-19 12:43:29 -04:00
|
|
|
Ret.AutoWritable = false;
|
2015-07-09 11:47:06 -04:00
|
|
|
Ret.DebugName = (InPassOutputId == ePId_Output0) ? TEXT("CircleDOFSetup0") : TEXT("CircleDOFSetup1");
|
|
|
|
|
|
|
|
|
|
// more precision for additive blending and we need the alpha channel
|
|
|
|
|
Ret.Format = PF_FloatRGBA;
|
|
|
|
|
|
|
|
|
|
return Ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Encapsulates the Circle DOF Dilate pixel shader. */
|
|
|
|
|
template <uint32 NearBlurEnable>
|
|
|
|
|
class FPostProcessCircleDOFDilatePS : public FGlobalShader
|
|
|
|
|
{
|
|
|
|
|
DECLARE_SHADER_TYPE(FPostProcessCircleDOFDilatePS, Global);
|
|
|
|
|
|
|
|
|
|
static bool ShouldCache(EShaderPlatform Platform)
|
|
|
|
|
{
|
2015-07-14 14:11:35 -04:00
|
|
|
return IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM4);
|
2015-07-09 11:47:06 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void ModifyCompilationEnvironment(EShaderPlatform Platform, FShaderCompilerEnvironment& OutEnvironment)
|
|
|
|
|
{
|
|
|
|
|
FGlobalShader::ModifyCompilationEnvironment(Platform,OutEnvironment);
|
|
|
|
|
OutEnvironment.SetDefine(TEXT("ENABLE_NEAR_BLUR"), NearBlurEnable);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Default constructor. */
|
|
|
|
|
FPostProcessCircleDOFDilatePS() {}
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
FPostProcessPassParameters PostprocessParameter;
|
|
|
|
|
FDeferredPixelShaderParameters DeferredParameters;
|
|
|
|
|
FShaderParameter DepthOfFieldParams;
|
|
|
|
|
|
|
|
|
|
/** Initialization constructor. */
|
|
|
|
|
FPostProcessCircleDOFDilatePS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
|
|
|
|
|
: FGlobalShader(Initializer)
|
|
|
|
|
{
|
|
|
|
|
PostprocessParameter.Bind(Initializer.ParameterMap);
|
|
|
|
|
DeferredParameters.Bind(Initializer.ParameterMap);
|
|
|
|
|
DepthOfFieldParams.Bind(Initializer.ParameterMap,TEXT("DepthOfFieldParams"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// FShader interface.
|
|
|
|
|
virtual bool Serialize(FArchive& Ar) override
|
|
|
|
|
{
|
|
|
|
|
bool bShaderHasOutdatedParameters = FGlobalShader::Serialize(Ar);
|
2015-10-31 10:55:13 -04:00
|
|
|
Ar << PostprocessParameter << DeferredParameters << DepthOfFieldParams;
|
2015-07-09 11:47:06 -04:00
|
|
|
return bShaderHasOutdatedParameters;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SetParameters(const FRenderingCompositePassContext& Context)
|
|
|
|
|
{
|
|
|
|
|
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
|
|
|
|
|
|
|
|
|
|
FGlobalShader::SetParameters(Context.RHICmdList, ShaderRHI, Context.View);
|
|
|
|
|
|
|
|
|
|
PostprocessParameter.SetPS(ShaderRHI, Context, TStaticSamplerState<SF_Point,AM_Border,AM_Border,AM_Clamp>::GetRHI());
|
|
|
|
|
|
|
|
|
|
DeferredParameters.Set(Context.RHICmdList, ShaderRHI, Context.View);
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
FVector4 DepthOfFieldParamValues[2];
|
|
|
|
|
|
|
|
|
|
FRCPassPostProcessBokehDOF::ComputeDepthOfFieldParams(Context, DepthOfFieldParamValues);
|
|
|
|
|
|
|
|
|
|
SetShaderValueArray(Context.RHICmdList, ShaderRHI, DepthOfFieldParams, DepthOfFieldParamValues, 2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
IMPLEMENT_SHADER_TYPE(template<>,FPostProcessCircleDOFDilatePS<0>,TEXT("PostProcessCircleDOF"),TEXT("CircleDilatePS"),SF_Pixel);
|
|
|
|
|
IMPLEMENT_SHADER_TYPE(template<>,FPostProcessCircleDOFDilatePS<1>,TEXT("PostProcessCircleDOF"),TEXT("CircleDilatePS"),SF_Pixel);
|
|
|
|
|
|
|
|
|
|
void FRCPassPostProcessCircleDOFDilate::Process(FRenderingCompositePassContext& Context)
|
|
|
|
|
{
|
|
|
|
|
SCOPED_DRAW_EVENT(Context.RHICmdList, CircleDOFNear);
|
|
|
|
|
|
|
|
|
|
const FPooledRenderTargetDesc* InputDesc = GetInputDesc(ePId_Input0);
|
|
|
|
|
|
|
|
|
|
if(!InputDesc)
|
|
|
|
|
{
|
|
|
|
|
// input is not hooked up correctly
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint32 NumRenderTargets = 1;
|
|
|
|
|
|
|
|
|
|
const FSceneView& View = Context.View;
|
|
|
|
|
const FSceneViewFamily& ViewFamily = *(View.Family);
|
|
|
|
|
|
|
|
|
|
const auto FeatureLevel = Context.GetFeatureLevel();
|
|
|
|
|
auto ShaderMap = Context.GetShaderMap();
|
|
|
|
|
|
|
|
|
|
FIntPoint SrcSize = InputDesc->Extent;
|
|
|
|
|
FIntPoint DestSize = PassOutputs[0].RenderTargetDesc.Extent;
|
|
|
|
|
|
|
|
|
|
// e.g. 4 means the input texture is 4x smaller than the buffer size
|
|
|
|
|
uint32 ScaleFactor = FSceneRenderTargets::Get(Context.RHICmdList).GetBufferSizeXY().X / SrcSize.X;
|
|
|
|
|
|
|
|
|
|
FIntRect SrcRect = View.ViewRect / ScaleFactor;
|
|
|
|
|
FIntRect DestRect = SrcRect / 2;
|
|
|
|
|
|
|
|
|
|
const FSceneRenderTargetItem& DestRenderTarget0 = PassOutputs[0].RequestSurface(Context);
|
|
|
|
|
const FSceneRenderTargetItem& DestRenderTarget1 = FSceneRenderTargetItem();
|
|
|
|
|
|
|
|
|
|
// Set the view family's render target/viewport.
|
|
|
|
|
FTextureRHIParamRef RenderTargets[2] =
|
|
|
|
|
{
|
|
|
|
|
DestRenderTarget0.TargetableTexture,
|
|
|
|
|
DestRenderTarget1.TargetableTexture
|
|
|
|
|
};
|
|
|
|
|
SetRenderTargets(Context.RHICmdList, NumRenderTargets, RenderTargets, FTextureRHIParamRef(), 0, NULL);
|
|
|
|
|
|
|
|
|
|
FLinearColor ClearColors[2] =
|
|
|
|
|
{
|
|
|
|
|
FLinearColor(0, 0, 0, 0),
|
|
|
|
|
FLinearColor(0, 0, 0, 0)
|
|
|
|
|
};
|
|
|
|
|
// is optimized away if possible (RT size=view size, )
|
|
|
|
|
Context.RHICmdList.ClearMRT(true, NumRenderTargets, ClearColors, false, 1.0f, false, 0, DestRect);
|
|
|
|
|
|
|
|
|
|
Context.SetViewportAndCallRHI(0, 0, 0.0f, DestSize.X, DestSize.Y, 1.0f );
|
|
|
|
|
|
|
|
|
|
// set the state
|
|
|
|
|
Context.RHICmdList.SetBlendState(TStaticBlendState<>::GetRHI());
|
|
|
|
|
Context.RHICmdList.SetRasterizerState(TStaticRasterizerState<>::GetRHI());
|
|
|
|
|
Context.RHICmdList.SetDepthStencilState(TStaticDepthStencilState<false, CF_Always>::GetRHI());
|
|
|
|
|
|
|
|
|
|
TShaderMapRef<FPostProcessVS> VertexShader(ShaderMap);
|
|
|
|
|
|
|
|
|
|
if (false)
|
|
|
|
|
{
|
|
|
|
|
static FGlobalBoundShaderState BoundShaderState;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TShaderMapRef< FPostProcessCircleDOFDilatePS<1> > PixelShader(ShaderMap);
|
|
|
|
|
SetGlobalBoundShaderState(Context.RHICmdList, FeatureLevel, BoundShaderState, GFilterVertexDeclaration.VertexDeclarationRHI, *VertexShader, *PixelShader);
|
|
|
|
|
|
|
|
|
|
PixelShader->SetParameters(Context);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
static FGlobalBoundShaderState BoundShaderState;
|
|
|
|
|
|
|
|
|
|
TShaderMapRef< FPostProcessCircleDOFDilatePS<0> > PixelShader(ShaderMap);
|
|
|
|
|
SetGlobalBoundShaderState(Context.RHICmdList, FeatureLevel, BoundShaderState, GFilterVertexDeclaration.VertexDeclarationRHI, *VertexShader, *PixelShader);
|
|
|
|
|
|
|
|
|
|
PixelShader->SetParameters(Context);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
VertexShader->SetParameters(Context);
|
|
|
|
|
|
2015-08-04 19:33:26 -04:00
|
|
|
DrawPostProcessPass(
|
2015-07-09 11:47:06 -04:00
|
|
|
Context.RHICmdList,
|
|
|
|
|
DestRect.Min.X, DestRect.Min.Y,
|
|
|
|
|
DestRect.Width() + 1, DestRect.Height() + 1,
|
|
|
|
|
SrcRect.Min.X, SrcRect.Min.Y,
|
|
|
|
|
SrcRect.Width() + 1, SrcRect.Height() + 1,
|
|
|
|
|
DestSize,
|
|
|
|
|
SrcSize,
|
|
|
|
|
*VertexShader,
|
2015-08-04 19:33:26 -04:00
|
|
|
View.StereoPass,
|
|
|
|
|
Context.HasHmdMesh(),
|
2015-07-09 11:47:06 -04:00
|
|
|
EDRF_UseTriangleOptimization);
|
2015-08-04 19:33:26 -04:00
|
|
|
|
2015-07-09 11:47:06 -04:00
|
|
|
Context.RHICmdList.CopyToResolveTarget(DestRenderTarget0.TargetableTexture, DestRenderTarget0.ShaderResourceTexture, false, FResolveParams());
|
Copying //UE4/Orion-Staging to //UE4/Main (Source: //Orion/Dev-General @ 2949393)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2949393 on 2016/04/20 by Graeme.Thornton
Orion non-pak file security.
- Removed security bypass code from platform pak file
- Added a delegate to pak file code which allows the game to decide whether a file should be allowed or not
- Added an orion delegate which whitelists appropriate files
#rb robert.manuszewski
#tests win64 client + dedicated server. golden path.
Change 2949232 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: michael.noland
Paragon: Added a distinct menu frame rate limit, currently set to 60 fps and not visible in settings (if the user sets a game frame rate limit of below 60, we also clamp the menu limit to that threshold, so they can go down but not up for menus)
#jira OR-18017
#rb marcus.wassmer
#tests Ran paragon and switched between gameplay, menus, and replays, observing t.MaxFPS at different points
#ROBOMERGE-SOURCE: CL 2949231 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2949032 on 2016/04/19 by Zak.Middleton
#orion - Lower default NetUpdateFrequency for minions (10->6). Avoid excessive latency for some knockback/knockup abilities that would have noticeable lag by forcing an update sooner when they are triggered.
This should have the following effects:
1. Reduce server CPU cost (we tick minions at the net frequency).
2. Reduce server bandwidth
3. Reduce client CPU cost (we move character capsules and perform overlaps when new positions are received).
#rb Bart.Bressler, John.Pollard
#codereview Dmitry.Rekman
#tests MultiPIE AI lane, Replays
Change 2948966 on 2016/04/19 by Lina.Halper
Added log (check) of the asset info for Anim Per Track contains invalid format key
#rb: Michael.Noland
#code review: Martin.Wilson, Laurent.Delayen, Michael.Noland
#tests: editor/ cooked and test with AI_Tests with 10 bots.
Change 2948876 on 2016/04/19 by Michael.Noland
PS4: Validate that the texture pool size is not set to automatic (-1, which will crash later on as an attempt to allocate too much memory)
#rb none
#codereview marcus.wassmer
#tests Ran Paragon on PS4
Change 2948765 on 2016/04/19 by Daniel.Lamb
Removed AssetImportData tag from cooked asset registry builds.
#rb Andrew.Grant
#test Cook orion
Change 2948691 on 2016/04/19 by Marcus.Wassmer
Fix copytoresolvetarget ensure
#rb none
#test pc agora
Change 2948633 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: jason.bestimt
[AUTOMERGE]
Fix copytoresolve crash and change validation to ensure.
#test PC editor / PC golden path
#rb none
--------
Integrated using branch //Orion/Main_to_//Orion/Release-Next (reversed) of change#2948169 by Marcus.Wassmer on 2016/04/19 10:50:32.
#ROBOMERGE-SOURCE: CL 2948632 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2948507 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: andrew.grant
Merging 2937781 (Pak signing) using //Orion/Dev-General_to_Release
#rb none
#tests cooked client, checked game runs
#ROBOMERGE-SOURCE: CL 2948497 in //Orion/Release-0.24.1/... via CL 2948506
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2948431 on 2016/04/19 by Steve.Robb
CL#s 2919775 and 2942793 integrated to prevent annotation map performance problems on shutdown and asserts in PIE.
#codereview robert.manuszewski,bob.tellez
#rb bob.tellez
#tests Ran editor
Change 2948408 on 2016/04/19 by Leslie.Nivison
Adding .tps
#rb none
#test none
Change 2948185 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: chris.bunner
Fix for HLOD visibility freeze.
#tests Golden Path, Editor
#rb rolando.caloca, michael.noland
#lockdown andrew.grant
#jira OR-19863
#ROBOMERGE-SOURCE: CL 2948182 in //Orion/Release-0.24.1/... via CL 2948183
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2948149 on 2016/04/19 by Simon.Tovey
Fixed crash. Collision rendering path was not dealing with mesh batch with 0 triangles where other paths do.
#rb none
#tests No more crash
#codereview Marcus.Wassmer
Change 2948129 on 2016/04/19 by Lukasz.Furman
fixed gameplay debugger getting stuck with outdated data pack on client,
changed names of AI related debug cvars
#rb none
#tests game, PIE
#codereview Mieszko.Zielinski
Change 2948027 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: graeme.thornton
Fix for OR-20033 - CRASH: Client will crash with FRCPassPostProcessCircleDOFSetup
#rb none
#tests checked game runs without crashing
#ROBOMERGE-SOURCE: CL 2948017 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2947558 on 2016/04/18 by Matt.Kuhlenschmidt
Fix compile error
#rb none, #tests none
Change 2947509 on 2016/04/18 by Matt.Kuhlenschmidt
Added more logging to track down
https://jira.ol.epicgames.net/browse/OR-19841
#rb none, #tests none
Change 2947412 on 2016/04/18 by Ryan.Gerleve
Fix shadowed variable.
#rb none
#tests none
Change 2947377 on 2016/04/18 by Jamie.Dale
Gather paths are now sorted by fuzzy-ness, so that more specific includes beat less specific excludes
#rb Matt.Kuhlenschmidt
#tests Built for Windows. Ran a gather, and confirmed that explicitly included heroes were now gathered, and that generically excluded heroes were absent from the gather.
Change 2947351 on 2016/04/18 by Ryan.Gerleve
Allow overriding the demo.AsyncLoadWorld setting with a URL option when playing a replay.
Store the entire URL in the demo net driver instead of just the map name, so that the options can be accessed later.
#tests golden path, replays
#rb john.pollard
Change 2947103 on 2016/04/18 by david.nikdel
#ROBOMERGE-AUTHOR: jason.bestimt
#ORION_MAIN - Merge 24.1 @ CL 2947071
#RB:none
#Tests:none
#ROBOMERGE-SOURCE: CL 2947102 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2947007 on 2016/04/18 by Zak.Middleton
#ue4 - Improve linear smoothing in the presence of low net frequency updates.
#rb Bart.Bressler
#tests MultiPIE AI with lanes
Change 2946994 on 2016/04/18 by Mieszko.Zielinski
Improvements to NavigationSystem's "abstract navigation data" support #UE4
#rb Lukasz.Furman
#test golden path
Change 2946760 on 2016/04/18 by Chris.Bunner
Fixing up bad merge, recommit of CL 2819472 - ForceLOD now clamps to available LODs on primitive, i.e. use MinLOD rather than not drawing at all.
#tests Editor
#rb None
Change 2946745 on 2016/04/18 by david.nikdel
#ROBOMERGE-AUTHOR: jason.bestimt
#ORION_MAIN - Merge 24.1 @ CL 2946637
#RB:none
#Tests:none
#ROBOMERGE-SOURCE: CL 2946656 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2946645 on 2016/04/18 by Richard.Fawcett
When promoting a buidl to staged, prevent enumeration of files already in S3
Enumerating files in S3 is a slow process, and it turns out that simply uploading all chunks blindly is more efficient than enumerating existing chunks and selectively uploading only the new ones.
#rb Leigh.Swift
#tests This technique has already been used in launcher promotions for several months
Change 2946622 on 2016/04/18 by Richard.Fawcett
By default, when enumerating chunks from a manifest file, skip checking they exist on disk at enumeration time.
This will fail anyway further down the line if the files don't exist, but will improve speed of stage promotions by around five minutes. In practice, we have NEVER seen a job fail at this point because of the existence check.
#rb Leigh.Swift
#tests Ensure that output of ExtractDataFilenamesFromManifest method is identical both with and without bSkipExistsCheck specified.
Change 2945812 on 2016/04/15 by Daniel.Lamb
Fixed error in diff cooked build commandlet.
#rb ben.marsh
#test Compile.
Change 2945110 on 2016/04/15 by Matt.Kuhlenschmidt
Fix crash exporting actors with non-scene components to fbx
#rb none, #tests full scene exporting on maps that crashed
#codereview alexis.matte
Change 2945078 on 2016/04/15 by Simon.Tovey
Fix for OR-19778
When some pooled systems are reused, on init they have a non zero lod level but the emitter instances are created at LOD 0 initially.
So the component did not think it had to update it's LOD but the emitters were not at the correct LOD.
Have forced a LOD set on init when the component LOD is non-zero.
#rb none
#tests Works in editor and game.
#codereview Olaf.Piesche
Change 2944664 on 2016/04/14 by Uriel.Doyon
Fix to SM4 compilation issue
#jira OR-19706
#rb marcus.wassmer
#tests tested editor in SM4 and SM5
Change 2944642 on 2016/04/14 by Lukasz.Furman
changed waypoint switch conditions in meta nav paths
#rb none
#tests PIE
#codereview Mieszko.Zielinski
Change 2944599 on 2016/04/14 by david.nikdel
#ROBOMERGE-AUTHOR: andrew.grant
Added sha1 to UnrealPak list output
#rb none
#tests listed content of pakfile
#ROBOMERGE-SOURCE: CL 2944595 in //Orion/Release-0.24/... via CL 2944597 via CL 2944598
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2944441 on 2016/04/14 by Marcus.Wassmer
Duplicate change to output shader compiler errors.
#rb none
#test run PC and see errors.
Change 2944437 on 2016/04/14 by John.Pollard
Possible fix for https://jira.ol.epicgames.net/browse/OR-19614
#rb JoshM
#codereview Josh.Markiewicz
#tests Golden path matchmaking
Change 2944430 on 2016/04/14 by david.nikdel
#ROBOMERGE-AUTHOR: michael.noland
Engine: Added support for more/fewer settings in individual categories to the editor scalability control widget
#rb david.ratti
#tests Tested in the editor
#ROBOMERGE-SOURCE: CL 2944428 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2944198 on 2016/04/14 by David.Ratti
Paragon - register for slow/stun/root/silence callbacks on any tag count change, not just add/remove. This is so the UI will update if you get another stack of a stackable slow GE.
Ability system - unify client stack count change code path with server. Client now properly update owner ASC's tag map and broadcasts all delegates there.
#rb dayY
#tests pie
Change 2944124 on 2016/04/14 by Wes.Hunt
Change the TPS redirects for DX modules to point to the proper DX redist TPS which is what packaged games will need.
#codereview:leslie.nivison
#rb none
#tests ran UAT ListThirdPartySoftware <for Orion>
Change 2944107 on 2016/04/14 by Wes.Hunt
MeshUtilities now depends on new module nvTessLib to better track the third party dependency.
#codereview:daniel.wright
#rb none
#tests build OrionClient/Editor for Win64
Change 2944102 on 2016/04/14 by Wes.Hunt
Tweak to UBT -ListBuildFolders to do a distinct in a better place to cut down on duplicate module searches.
#tests ran the UBT command
#rb none
Change 2943851 on 2016/04/14 by Ryan.Gerleve
Fix the ForEachNetDriver helper function to get the world context directly off the world instead of going through the game instance. Ensures the correct net drivers will be used when there are multiple worlds but only one game instance.
#rb john.pollard
#tests golden path, replays, PIE
Change 2943847 on 2016/04/14 by Ryan.Gerleve
Fixes to support client replay recording & playback in another world:
When recording a replay, only swap actor roles if the remote role is ROLE_Authority
When loading a replay checkpoint, call NetworkRemapPath to make sure paths have the correct name in the GuidCache
#rb john.pollard
#tests golden path, replays, PIE
Change 2943691 on 2016/04/14 by david.nikdel
#ROBOMERGE-AUTHOR: jason.bestimt
#ORION_24 - Fix for OR-19609, OR-19610, and OR-19611
#RB:none
#Tests:none
#ROBOMERGE-SOURCE: CL 2943687 in //Orion/Release-0.24/... via CL 2943688
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2943508 on 2016/04/14 by Richard.Fawcett
Automation: Add support for multipart file uploads to Amazon S3 to increase speed of large file uploads.
#jira OPPBUILD-44
#rb Leigh.Swift
#tests Uploaded files to S3 using the new routines, downlaoded via AWS management console and ensured downloaded files identical to uploaded ones
Change 2943274 on 2016/04/13 by jason.bestimt
#ORION_MAIN - Merge 24 @ CL 2943257
#RB:none
#Tests:none
#ROBOMERGE-SOURCE: CL 2943271 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
#ROBOMERGE-SAYS: Beep boop! I couldn't merge this change. Please do it yourself, human.
#CodeReview: david.nikdel, jason.bestimt
Change 2943178 on 2016/04/13 by Olaf.Piesche
Bumping size of the particle curve texture to 512x512
#rb martin.mittring
#tests PC Editor, Game
Change 2943174 on 2016/04/13 by Aaron.McLeran
OR-19392 Ensure condition failed: (*RequiresInitialization == 0) on loading into PVP match
- Removing ensure since there is a rare edge case where it's possible for a sound looping node may get ResetChildren called twice.
- Condition is when a child random node o fa looping node has a blank entry and results in no sound chosen in a given frame (which results in ResetChildren getting called). Later in the frame, if a sound had previously been playing with an active sound, it will have stop called on it, which will call NotifyWaveInstanceFinished and hit the ensure. Simply using the branch to check if the looping node has been initialized will work fine in this and other cases.
#codereview Bob.Tellez
#rb Bob.Tellez
#tests ran orion with this change testing problematic sound cue
Change 2943042 on 2016/04/13 by Rob.Cannaday
Fix crash in HTTP completion delegates on shutdown
Stop ticking HTTP retry manager after FOnlineSubsystemImpl::Shutdown has been called
#rb josh.markiewicz
#tests shutting down multiple times
Change 2942913 on 2016/04/13 by Lukasz.Furman
added meta navmesh paths
#orion
#rb Mieszko.Zielinski
#tests PIE
Change 2942132 on 2016/04/13 by Wes.Hunt
Enable UBT -ListBuildFolders to operate on Mac and iOS platforms without having to fully set up the remote environment.
#codereview:leslie.nivison
#rb peter.sauerbrei
#tests running UBT with and without -listbuildfolders
Change 2941651 on 2016/04/12 by Jason.Bestimt
#ORION_DG - Merge MAIN @ CL 2941645
#RB:none
#Tests:none
Change 2941539 on 2016/04/12 by Laurent.Delayen
FABRIK: Normalize outgoing rotations.
Fixes Chains Q ability crashing.
#rb none
#tests Chains not crashing
Change 2941469 on 2016/04/12 by Wes.Hunt
Fix UBT -ListBuildFolders to not prep target for deployment.
#codereview:leslie.nivison
#rb none
#tests tested -ListBuildFolders for Android
Change 2941434 on 2016/04/12 by Leslie.Nivison
Adding/cleaning up .tps files
#rb none
#test none
Change 2941241 on 2016/04/12 by Daniel.Lamb
Removed shadername from the shader code to fix deterministic material cooking issue.
#jira UE-29320
#codereview Marcus.Wassmer
#rb Marcus.Wassmer
#test Running editor, cooking orion.
Change 2941046 on 2016/04/12 by Laurent.Delayen
Added safety net for non state AnimNotifies having a non-zero EndTriggerTimeOffset.
Fixes Twinblast double shot for the left primary attack.
#rb benn.gallagher
#codereview lina.halper, ray.arnett, aaron.eady
#tests twinblast's LMB
Change 2941032 on 2016/04/12 by Jason.Bestimt
#ORION_24 - Merge MAIN @ CL 2940950
#RB:none
#Tests:none
[CL 2952833 by Andrew Grant in Main branch]
2016-04-22 11:21:10 -04:00
|
|
|
|
|
|
|
|
if (DestRenderTarget1.TargetableTexture)
|
|
|
|
|
{
|
|
|
|
|
Context.RHICmdList.CopyToResolveTarget(DestRenderTarget1.TargetableTexture, DestRenderTarget1.ShaderResourceTexture, false, FResolveParams());
|
|
|
|
|
}
|
2015-07-09 11:47:06 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FPooledRenderTargetDesc FRCPassPostProcessCircleDOFDilate::ComputeOutputDesc(EPassOutputId InPassOutputId) const
|
|
|
|
|
{
|
|
|
|
|
FPooledRenderTargetDesc Ret = GetInput(ePId_Input0)->GetOutput()->RenderTargetDesc;
|
|
|
|
|
|
|
|
|
|
// Ret.Extent = FIntPoint::DivideAndRoundUp(ret.Extent, 2);
|
|
|
|
|
Ret.Extent /= 2;
|
|
|
|
|
Ret.Extent.X = FMath::Max(1, Ret.Extent.X);
|
|
|
|
|
Ret.Extent.Y = FMath::Max(1, Ret.Extent.Y);
|
|
|
|
|
|
|
|
|
|
Ret.Reset();
|
|
|
|
|
Ret.TargetableFlags &= ~(uint32)TexCreate_UAV;
|
|
|
|
|
Ret.TargetableFlags |= TexCreate_RenderTargetable;
|
|
|
|
|
|
|
|
|
|
Ret.DebugName = (InPassOutputId == ePId_Output0) ? TEXT("CircleDOFDilate0") : TEXT("CircleDOFDilate1");
|
|
|
|
|
|
2015-10-28 08:58:16 -04:00
|
|
|
// Ret.Format = PF_FloatRGBA;
|
|
|
|
|
// we only use one channel, maybe using 4 channels would save memory as we reuse
|
|
|
|
|
Ret.Format = PF_R16F;
|
2015-07-09 11:47:06 -04:00
|
|
|
|
|
|
|
|
return Ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Encapsulates the Circle DOF pixel shader. */
|
|
|
|
|
|
|
|
|
|
static float TemporalHalton2( int32 Index, int32 Base )
|
|
|
|
|
{
|
|
|
|
|
float Result = 0.0f;
|
|
|
|
|
float InvBase = 1.0f / Base;
|
|
|
|
|
float Fraction = InvBase;
|
|
|
|
|
while( Index > 0 )
|
|
|
|
|
{
|
|
|
|
|
Result += ( Index % Base ) * Fraction;
|
|
|
|
|
Index /= Base;
|
|
|
|
|
Fraction *= InvBase;
|
|
|
|
|
}
|
|
|
|
|
return Result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void TemporalRandom2(FVector2D* RESTRICT const Constant, uint32 FrameNumber)
|
|
|
|
|
{
|
|
|
|
|
Constant->X = TemporalHalton2(FrameNumber & 1023, 2);
|
|
|
|
|
Constant->Y = TemporalHalton2(FrameNumber & 1023, 3);
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-25 18:48:48 -04:00
|
|
|
template <uint32 NearBlurEnable, uint32 Quality>
|
2015-07-09 11:47:06 -04:00
|
|
|
class FPostProcessCircleDOFPS : public FGlobalShader
|
|
|
|
|
{
|
|
|
|
|
DECLARE_SHADER_TYPE(FPostProcessCircleDOFPS, Global);
|
|
|
|
|
|
|
|
|
|
static bool ShouldCache(EShaderPlatform Platform)
|
|
|
|
|
{
|
2015-07-14 14:11:35 -04:00
|
|
|
return IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM4);
|
2015-07-09 11:47:06 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void ModifyCompilationEnvironment(EShaderPlatform Platform, FShaderCompilerEnvironment& OutEnvironment)
|
|
|
|
|
{
|
|
|
|
|
FGlobalShader::ModifyCompilationEnvironment(Platform,OutEnvironment);
|
|
|
|
|
OutEnvironment.SetDefine(TEXT("ENABLE_NEAR_BLUR"), NearBlurEnable);
|
2015-09-25 18:48:48 -04:00
|
|
|
OutEnvironment.SetDefine(TEXT("QUALITY"), Quality);
|
2015-07-09 11:47:06 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Default constructor. */
|
|
|
|
|
FPostProcessCircleDOFPS() {}
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
FPostProcessPassParameters PostprocessParameter;
|
|
|
|
|
FDeferredPixelShaderParameters DeferredParameters;
|
|
|
|
|
FShaderParameter DepthOfFieldParams;
|
|
|
|
|
FShaderParameter RandomOffset;
|
|
|
|
|
|
|
|
|
|
/** Initialization constructor. */
|
|
|
|
|
FPostProcessCircleDOFPS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
|
|
|
|
|
: FGlobalShader(Initializer)
|
|
|
|
|
{
|
|
|
|
|
PostprocessParameter.Bind(Initializer.ParameterMap);
|
|
|
|
|
DeferredParameters.Bind(Initializer.ParameterMap);
|
|
|
|
|
DepthOfFieldParams.Bind(Initializer.ParameterMap,TEXT("DepthOfFieldParams"));
|
|
|
|
|
RandomOffset.Bind(Initializer.ParameterMap, TEXT("RandomOffset"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// FShader interface.
|
|
|
|
|
virtual bool Serialize(FArchive& Ar) override
|
|
|
|
|
{
|
|
|
|
|
bool bShaderHasOutdatedParameters = FGlobalShader::Serialize(Ar);
|
2015-10-31 10:55:13 -04:00
|
|
|
Ar << PostprocessParameter << DeferredParameters << DepthOfFieldParams << RandomOffset;
|
2015-07-09 11:47:06 -04:00
|
|
|
return bShaderHasOutdatedParameters;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SetParameters(const FRenderingCompositePassContext& Context)
|
|
|
|
|
{
|
|
|
|
|
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
|
|
|
|
|
|
|
|
|
|
FGlobalShader::SetParameters(Context.RHICmdList, ShaderRHI, Context.View);
|
|
|
|
|
|
|
|
|
|
PostprocessParameter.SetPS(ShaderRHI, Context, TStaticSamplerState<SF_Point,AM_Border,AM_Border,AM_Clamp>::GetRHI());
|
2015-10-28 08:58:16 -04:00
|
|
|
/*
|
|
|
|
|
{
|
|
|
|
|
FSamplerStateRHIParamRef Filters[] =
|
|
|
|
|
{
|
|
|
|
|
TStaticSamplerState<SF_Point,AM_Clamp,AM_Clamp,AM_Clamp>::GetRHI(),
|
|
|
|
|
TStaticSamplerState<SF_Bilinear,AM_Clamp,AM_Clamp,AM_Clamp>::GetRHI(),
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
PostprocessParameter.SetPS( ShaderRHI, Context, 0, false, Filters );
|
|
|
|
|
}
|
|
|
|
|
*/
|
2015-07-09 11:47:06 -04:00
|
|
|
|
|
|
|
|
DeferredParameters.Set(Context.RHICmdList, ShaderRHI, Context.View);
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
FVector4 DepthOfFieldParamValues[2];
|
|
|
|
|
|
|
|
|
|
FRCPassPostProcessBokehDOF::ComputeDepthOfFieldParams(Context, DepthOfFieldParamValues);
|
|
|
|
|
|
|
|
|
|
SetShaderValueArray(Context.RHICmdList, ShaderRHI, DepthOfFieldParams, DepthOfFieldParamValues, 2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FVector2D RandomOffsetValue;
|
|
|
|
|
TemporalRandom2(&RandomOffsetValue, Context.View.Family->FrameNumber);
|
|
|
|
|
SetShaderValue(Context.RHICmdList, ShaderRHI, RandomOffset, RandomOffsetValue);
|
|
|
|
|
}
|
2015-09-25 18:48:48 -04:00
|
|
|
|
|
|
|
|
static const TCHAR* GetSourceFilename()
|
|
|
|
|
{
|
|
|
|
|
return TEXT("PostProcessCircleDOF");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const TCHAR* GetFunctionName()
|
|
|
|
|
{
|
|
|
|
|
return TEXT("CirclePS");
|
|
|
|
|
}
|
2015-07-09 11:47:06 -04:00
|
|
|
};
|
|
|
|
|
|
2015-09-25 18:48:48 -04:00
|
|
|
|
|
|
|
|
// #define avoids a lot of code duplication
|
|
|
|
|
#define VARIATION1(A, B) typedef FPostProcessCircleDOFPS<A, B> FPostProcessCircleDOFPS##A##B; \
|
|
|
|
|
IMPLEMENT_SHADER_TYPE2(FPostProcessCircleDOFPS##A##B, SF_Pixel);
|
|
|
|
|
|
|
|
|
|
VARIATION1(0,0) VARIATION1(1,0)
|
Copying //UE4/Dev-Rendering to Dev-Main (//UE4/Dev-Main)
#lockdown nick.penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2879377 on 2016/02/24 by Gil.Gribb
UE4 - Added render thread start and stop delegates. GitHub 2006.
#Jira UE-26184
Change 2879378 on 2016/02/24 by Gil.Gribb
UE4 - Avoided using TG_PrePhysics as the first tickgroup so that licensees can add tickgropups.
https://udn.unrealengine.com/questions/279126/code-assumes-that-tg-prephysics-is-the-first-tick.html
#Jira UE-26971
Change 2879382 on 2016/02/24 by Gil.Gribb
UE4 - Tweaked automation test framework by request from UDN post.
Change 2879727 on 2016/02/24 by Martin.Mittring
adding debug info for Optimus driver detection issue
#rb:Benjamin.Hyder
#Test:PC
Change 2879728 on 2016/02/24 by Martin.Mittring
fixed and improved VisualizeMotionBlur
#rb:David.Hill
#test:PC
Change 2879729 on 2016/02/24 by Martin.Mittring
added AngleBetweenVectors() and variants to the FastMath library
#rb:David.Hill
#code_review:Brian.Karis
Change 2880133 on 2016/02/24 by David.Hill
new r.DepthOfFieldQualitySetting
for GDC squencer demo
#rb:Martin.Mittring
- OR-15875
Change 2880314 on 2016/02/24 by Daniel.Wright
Fixed uses of FDepthDrawingPolicyFactory being affected by bUseAsOccluder
* This fixes preshadows on HISMC and foliage
Change 2880338 on 2016/02/24 by Martin.Mittring
added SkinCache.Debug cvar
#rb:Lina.Halper
#test:PC
Change 2880344 on 2016/02/24 by Daniel.Wright
Added the ability to apply DFAO to static indirect lighting, controlled by r.AOApplyToStaticIndirect
* Lightmaps, stationary skylight and reflection captures are all affected
* Specular occlusion on reflection captures requires a fair amount of tweaking of r.SkySpecularOcclusionStrength, MinOcclusion and MaxOcclusionDistance for good quality
* For now, a movable skylight with low intensity (.0001) must be placed to control MaxOcclusionDistance and MinOcclusion
Change 2880346 on 2016/02/24 by Daniel.Wright
Added several cvars to expose mesh distance field limits, which allows higher quality
* r.DistanceFields.MaxPerMeshResolution
* r.DistanceFields.DefaultVoxelDensity
* r.DistanceFields.AtlasSizeXY
* r.DistanceFields.AtlasSizeZ
Change 2881304 on 2016/02/25 by Gil.Gribb
UE4 - Increased the priority of cloth tasks because these are on the critical path.
Change 2881306 on 2016/02/25 by Gil.Gribb
UE4 - Added cvar to control background tick list cleanup.
Change 2881790 on 2016/02/25 by Daniel.Wright
Screen size fading is only applied to spot and point lights
Change 2882077 on 2016/02/25 by Daniel.Wright
DFAO indirect occlusion on static lighting is now correctly applied to IndirectIrradiance
Change 2882391 on 2016/02/25 by Martin.Mittring
fixed bad caching of SRV for vertexbuffers in SkinCache (caused rendering artifacts and wasteful memory allocations). Finding a SRV is now O(1), was O(n)
#rb:Olaf.Piesche
#code_review:Rolando.Caloca,Marcus.Wassmer
Change 2883008 on 2016/02/26 by Gil.Gribb
UE4 - Fixed recursive shader intialization crash on consoles.
Change 2883253 on 2016/02/26 by Martin.Mittring
Improved SkinTangent compression
#rb:Olaf.Piesche
Change 2883295 on 2016/02/26 by Martin.Mittring
Added RecomputeSkinTangent feature for GPU SkinCache, not enabled by default (r.SkinCache.RecomputeTangents)
#rb:Olaf.Piesche,Brian.Karis,Lina.Halper,Rolando.Caloca
Change 2883363 on 2016/02/26 by Gil.Gribb
UE4 - Fixed an issue with recurisve shader init on consoles...again.
Change 2883912 on 2016/02/26 by Gil.Gribb
UE4 - Fixed shadows updating static meshes while the prepass is in progress.
Change 2884829 on 2016/02/27 by Martin.Mittring
OR-16237 indirect lighting on skin is too dark
#rb:Martin.Mittring
#code_review:Brian.Karis
Change 2885096 on 2016/02/28 by Martin.Mittring
OR-13678
[CL 2890130 by Gil Gribb in Main branch]
2016-03-02 13:38:38 -05:00
|
|
|
VARIATION1(0,1) VARIATION1(1,1)
|
|
|
|
|
VARIATION1(0,2) VARIATION1(1,2)
|
|
|
|
|
|
2015-09-25 18:48:48 -04:00
|
|
|
|
|
|
|
|
#undef VARIATION1
|
|
|
|
|
|
|
|
|
|
template <uint32 NearBlurEnable, uint32 Quality>
|
|
|
|
|
FShader* FRCPassPostProcessCircleDOF::SetShaderTempl(const FRenderingCompositePassContext& Context)
|
|
|
|
|
{
|
|
|
|
|
TShaderMapRef<FPostProcessVS> VertexShader(Context.GetShaderMap());
|
|
|
|
|
TShaderMapRef<FPostProcessCircleDOFPS<NearBlurEnable, Quality> > PixelShader(Context.GetShaderMap());
|
|
|
|
|
|
|
|
|
|
static FGlobalBoundShaderState BoundShaderState;
|
|
|
|
|
|
|
|
|
|
SetGlobalBoundShaderState(Context.RHICmdList, Context.GetFeatureLevel(), BoundShaderState, GFilterVertexDeclaration.VertexDeclarationRHI, *VertexShader, *PixelShader);
|
|
|
|
|
|
|
|
|
|
VertexShader->SetParameters(Context);
|
|
|
|
|
PixelShader->SetParameters(Context);
|
|
|
|
|
|
|
|
|
|
return *VertexShader;
|
|
|
|
|
}
|
2015-07-09 11:47:06 -04:00
|
|
|
|
|
|
|
|
void FRCPassPostProcessCircleDOF::Process(FRenderingCompositePassContext& Context)
|
|
|
|
|
{
|
|
|
|
|
SCOPED_DRAW_EVENT(Context.RHICmdList, CircleDOFApply);
|
|
|
|
|
|
|
|
|
|
const FPooledRenderTargetDesc* InputDesc = GetInputDesc(ePId_Input0);
|
|
|
|
|
|
|
|
|
|
if(!InputDesc)
|
|
|
|
|
{
|
|
|
|
|
// input is not hooked up correctly
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint32 NumRenderTargets = bNearBlurEnabled ? 2 : 1;
|
|
|
|
|
|
|
|
|
|
const FSceneView& View = Context.View;
|
|
|
|
|
const FSceneViewFamily& ViewFamily = *(View.Family);
|
|
|
|
|
|
|
|
|
|
const auto FeatureLevel = Context.GetFeatureLevel();
|
|
|
|
|
auto ShaderMap = Context.GetShaderMap();
|
|
|
|
|
|
|
|
|
|
FIntPoint SrcSize = InputDesc->Extent;
|
|
|
|
|
FIntPoint DestSize = PassOutputs[0].RenderTargetDesc.Extent;
|
|
|
|
|
|
|
|
|
|
// e.g. 4 means the input texture is 4x smaller than the buffer size
|
|
|
|
|
uint32 ScaleFactor = FSceneRenderTargets::Get(Context.RHICmdList).GetBufferSizeXY().X / SrcSize.X;
|
|
|
|
|
|
|
|
|
|
FIntRect SrcRect = View.ViewRect / ScaleFactor;
|
|
|
|
|
FIntRect DestRect = SrcRect;
|
|
|
|
|
|
|
|
|
|
const FSceneRenderTargetItem& DestRenderTarget0 = PassOutputs[0].RequestSurface(Context);
|
|
|
|
|
const FSceneRenderTargetItem& DestRenderTarget1 = bNearBlurEnabled ? PassOutputs[1].RequestSurface(Context) : FSceneRenderTargetItem();
|
|
|
|
|
|
|
|
|
|
// Set the view family's render target/viewport.
|
|
|
|
|
FTextureRHIParamRef RenderTargets[2] =
|
|
|
|
|
{
|
|
|
|
|
DestRenderTarget0.TargetableTexture,
|
|
|
|
|
DestRenderTarget1.TargetableTexture
|
|
|
|
|
};
|
|
|
|
|
SetRenderTargets(Context.RHICmdList, NumRenderTargets, RenderTargets, FTextureRHIParamRef(), 0, NULL);
|
|
|
|
|
|
|
|
|
|
FLinearColor ClearColors[2] =
|
|
|
|
|
{
|
|
|
|
|
FLinearColor(0, 0, 0, 0),
|
|
|
|
|
FLinearColor(0, 0, 0, 0)
|
|
|
|
|
};
|
|
|
|
|
// is optimized away if possible (RT size=view size, )
|
|
|
|
|
Context.RHICmdList.ClearMRT(true, NumRenderTargets, ClearColors, false, 1.0f, false, 0, DestRect);
|
|
|
|
|
|
|
|
|
|
Context.SetViewportAndCallRHI(0, 0, 0.0f, DestSize.X, DestSize.Y, 1.0f );
|
|
|
|
|
|
|
|
|
|
// set the state
|
|
|
|
|
Context.RHICmdList.SetBlendState(TStaticBlendState<>::GetRHI());
|
|
|
|
|
Context.RHICmdList.SetRasterizerState(TStaticRasterizerState<>::GetRHI());
|
|
|
|
|
Context.RHICmdList.SetDepthStencilState(TStaticDepthStencilState<false, CF_Always>::GetRHI());
|
2015-09-25 18:48:48 -04:00
|
|
|
|
|
|
|
|
static const auto CVar = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.DepthOfFieldQuality"));
|
|
|
|
|
check(CVar);
|
|
|
|
|
int32 DOFQualityCVarValue = CVar->GetValueOnRenderThread();
|
|
|
|
|
|
Copying //UE4/Dev-Rendering to Dev-Main (//UE4/Dev-Main)
#lockdown nick.penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2879377 on 2016/02/24 by Gil.Gribb
UE4 - Added render thread start and stop delegates. GitHub 2006.
#Jira UE-26184
Change 2879378 on 2016/02/24 by Gil.Gribb
UE4 - Avoided using TG_PrePhysics as the first tickgroup so that licensees can add tickgropups.
https://udn.unrealengine.com/questions/279126/code-assumes-that-tg-prephysics-is-the-first-tick.html
#Jira UE-26971
Change 2879382 on 2016/02/24 by Gil.Gribb
UE4 - Tweaked automation test framework by request from UDN post.
Change 2879727 on 2016/02/24 by Martin.Mittring
adding debug info for Optimus driver detection issue
#rb:Benjamin.Hyder
#Test:PC
Change 2879728 on 2016/02/24 by Martin.Mittring
fixed and improved VisualizeMotionBlur
#rb:David.Hill
#test:PC
Change 2879729 on 2016/02/24 by Martin.Mittring
added AngleBetweenVectors() and variants to the FastMath library
#rb:David.Hill
#code_review:Brian.Karis
Change 2880133 on 2016/02/24 by David.Hill
new r.DepthOfFieldQualitySetting
for GDC squencer demo
#rb:Martin.Mittring
- OR-15875
Change 2880314 on 2016/02/24 by Daniel.Wright
Fixed uses of FDepthDrawingPolicyFactory being affected by bUseAsOccluder
* This fixes preshadows on HISMC and foliage
Change 2880338 on 2016/02/24 by Martin.Mittring
added SkinCache.Debug cvar
#rb:Lina.Halper
#test:PC
Change 2880344 on 2016/02/24 by Daniel.Wright
Added the ability to apply DFAO to static indirect lighting, controlled by r.AOApplyToStaticIndirect
* Lightmaps, stationary skylight and reflection captures are all affected
* Specular occlusion on reflection captures requires a fair amount of tweaking of r.SkySpecularOcclusionStrength, MinOcclusion and MaxOcclusionDistance for good quality
* For now, a movable skylight with low intensity (.0001) must be placed to control MaxOcclusionDistance and MinOcclusion
Change 2880346 on 2016/02/24 by Daniel.Wright
Added several cvars to expose mesh distance field limits, which allows higher quality
* r.DistanceFields.MaxPerMeshResolution
* r.DistanceFields.DefaultVoxelDensity
* r.DistanceFields.AtlasSizeXY
* r.DistanceFields.AtlasSizeZ
Change 2881304 on 2016/02/25 by Gil.Gribb
UE4 - Increased the priority of cloth tasks because these are on the critical path.
Change 2881306 on 2016/02/25 by Gil.Gribb
UE4 - Added cvar to control background tick list cleanup.
Change 2881790 on 2016/02/25 by Daniel.Wright
Screen size fading is only applied to spot and point lights
Change 2882077 on 2016/02/25 by Daniel.Wright
DFAO indirect occlusion on static lighting is now correctly applied to IndirectIrradiance
Change 2882391 on 2016/02/25 by Martin.Mittring
fixed bad caching of SRV for vertexbuffers in SkinCache (caused rendering artifacts and wasteful memory allocations). Finding a SRV is now O(1), was O(n)
#rb:Olaf.Piesche
#code_review:Rolando.Caloca,Marcus.Wassmer
Change 2883008 on 2016/02/26 by Gil.Gribb
UE4 - Fixed recursive shader intialization crash on consoles.
Change 2883253 on 2016/02/26 by Martin.Mittring
Improved SkinTangent compression
#rb:Olaf.Piesche
Change 2883295 on 2016/02/26 by Martin.Mittring
Added RecomputeSkinTangent feature for GPU SkinCache, not enabled by default (r.SkinCache.RecomputeTangents)
#rb:Olaf.Piesche,Brian.Karis,Lina.Halper,Rolando.Caloca
Change 2883363 on 2016/02/26 by Gil.Gribb
UE4 - Fixed an issue with recurisve shader init on consoles...again.
Change 2883912 on 2016/02/26 by Gil.Gribb
UE4 - Fixed shadows updating static meshes while the prepass is in progress.
Change 2884829 on 2016/02/27 by Martin.Mittring
OR-16237 indirect lighting on skin is too dark
#rb:Martin.Mittring
#code_review:Brian.Karis
Change 2885096 on 2016/02/28 by Martin.Mittring
OR-13678
[CL 2890130 by Gil Gribb in Main branch]
2016-03-02 13:38:38 -05:00
|
|
|
|
2015-07-09 11:47:06 -04:00
|
|
|
|
2015-09-25 18:48:48 -04:00
|
|
|
FShader* VertexShader = 0;
|
2015-07-09 11:47:06 -04:00
|
|
|
|
|
|
|
|
if (bNearBlurEnabled)
|
|
|
|
|
{
|
Copying //UE4/Dev-Rendering to Dev-Main (//UE4/Dev-Main)
#lockdown nick.penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2879377 on 2016/02/24 by Gil.Gribb
UE4 - Added render thread start and stop delegates. GitHub 2006.
#Jira UE-26184
Change 2879378 on 2016/02/24 by Gil.Gribb
UE4 - Avoided using TG_PrePhysics as the first tickgroup so that licensees can add tickgropups.
https://udn.unrealengine.com/questions/279126/code-assumes-that-tg-prephysics-is-the-first-tick.html
#Jira UE-26971
Change 2879382 on 2016/02/24 by Gil.Gribb
UE4 - Tweaked automation test framework by request from UDN post.
Change 2879727 on 2016/02/24 by Martin.Mittring
adding debug info for Optimus driver detection issue
#rb:Benjamin.Hyder
#Test:PC
Change 2879728 on 2016/02/24 by Martin.Mittring
fixed and improved VisualizeMotionBlur
#rb:David.Hill
#test:PC
Change 2879729 on 2016/02/24 by Martin.Mittring
added AngleBetweenVectors() and variants to the FastMath library
#rb:David.Hill
#code_review:Brian.Karis
Change 2880133 on 2016/02/24 by David.Hill
new r.DepthOfFieldQualitySetting
for GDC squencer demo
#rb:Martin.Mittring
- OR-15875
Change 2880314 on 2016/02/24 by Daniel.Wright
Fixed uses of FDepthDrawingPolicyFactory being affected by bUseAsOccluder
* This fixes preshadows on HISMC and foliage
Change 2880338 on 2016/02/24 by Martin.Mittring
added SkinCache.Debug cvar
#rb:Lina.Halper
#test:PC
Change 2880344 on 2016/02/24 by Daniel.Wright
Added the ability to apply DFAO to static indirect lighting, controlled by r.AOApplyToStaticIndirect
* Lightmaps, stationary skylight and reflection captures are all affected
* Specular occlusion on reflection captures requires a fair amount of tweaking of r.SkySpecularOcclusionStrength, MinOcclusion and MaxOcclusionDistance for good quality
* For now, a movable skylight with low intensity (.0001) must be placed to control MaxOcclusionDistance and MinOcclusion
Change 2880346 on 2016/02/24 by Daniel.Wright
Added several cvars to expose mesh distance field limits, which allows higher quality
* r.DistanceFields.MaxPerMeshResolution
* r.DistanceFields.DefaultVoxelDensity
* r.DistanceFields.AtlasSizeXY
* r.DistanceFields.AtlasSizeZ
Change 2881304 on 2016/02/25 by Gil.Gribb
UE4 - Increased the priority of cloth tasks because these are on the critical path.
Change 2881306 on 2016/02/25 by Gil.Gribb
UE4 - Added cvar to control background tick list cleanup.
Change 2881790 on 2016/02/25 by Daniel.Wright
Screen size fading is only applied to spot and point lights
Change 2882077 on 2016/02/25 by Daniel.Wright
DFAO indirect occlusion on static lighting is now correctly applied to IndirectIrradiance
Change 2882391 on 2016/02/25 by Martin.Mittring
fixed bad caching of SRV for vertexbuffers in SkinCache (caused rendering artifacts and wasteful memory allocations). Finding a SRV is now O(1), was O(n)
#rb:Olaf.Piesche
#code_review:Rolando.Caloca,Marcus.Wassmer
Change 2883008 on 2016/02/26 by Gil.Gribb
UE4 - Fixed recursive shader intialization crash on consoles.
Change 2883253 on 2016/02/26 by Martin.Mittring
Improved SkinTangent compression
#rb:Olaf.Piesche
Change 2883295 on 2016/02/26 by Martin.Mittring
Added RecomputeSkinTangent feature for GPU SkinCache, not enabled by default (r.SkinCache.RecomputeTangents)
#rb:Olaf.Piesche,Brian.Karis,Lina.Halper,Rolando.Caloca
Change 2883363 on 2016/02/26 by Gil.Gribb
UE4 - Fixed an issue with recurisve shader init on consoles...again.
Change 2883912 on 2016/02/26 by Gil.Gribb
UE4 - Fixed shadows updating static meshes while the prepass is in progress.
Change 2884829 on 2016/02/27 by Martin.Mittring
OR-16237 indirect lighting on skin is too dark
#rb:Martin.Mittring
#code_review:Brian.Karis
Change 2885096 on 2016/02/28 by Martin.Mittring
OR-13678
[CL 2890130 by Gil Gribb in Main branch]
2016-03-02 13:38:38 -05:00
|
|
|
switch (DOFQualityCVarValue)
|
|
|
|
|
{
|
|
|
|
|
case 0: VertexShader = SetShaderTempl<1, 0>(Context); break;
|
|
|
|
|
case 3: VertexShader = SetShaderTempl<1, 1>(Context); break;
|
|
|
|
|
case 4: VertexShader = SetShaderTempl<1, 2>(Context); break;
|
|
|
|
|
default: VertexShader = SetShaderTempl<1, 0>(Context);
|
|
|
|
|
}
|
2015-07-09 11:47:06 -04:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
Copying //UE4/Dev-Rendering to Dev-Main (//UE4/Dev-Main)
#lockdown nick.penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2879377 on 2016/02/24 by Gil.Gribb
UE4 - Added render thread start and stop delegates. GitHub 2006.
#Jira UE-26184
Change 2879378 on 2016/02/24 by Gil.Gribb
UE4 - Avoided using TG_PrePhysics as the first tickgroup so that licensees can add tickgropups.
https://udn.unrealengine.com/questions/279126/code-assumes-that-tg-prephysics-is-the-first-tick.html
#Jira UE-26971
Change 2879382 on 2016/02/24 by Gil.Gribb
UE4 - Tweaked automation test framework by request from UDN post.
Change 2879727 on 2016/02/24 by Martin.Mittring
adding debug info for Optimus driver detection issue
#rb:Benjamin.Hyder
#Test:PC
Change 2879728 on 2016/02/24 by Martin.Mittring
fixed and improved VisualizeMotionBlur
#rb:David.Hill
#test:PC
Change 2879729 on 2016/02/24 by Martin.Mittring
added AngleBetweenVectors() and variants to the FastMath library
#rb:David.Hill
#code_review:Brian.Karis
Change 2880133 on 2016/02/24 by David.Hill
new r.DepthOfFieldQualitySetting
for GDC squencer demo
#rb:Martin.Mittring
- OR-15875
Change 2880314 on 2016/02/24 by Daniel.Wright
Fixed uses of FDepthDrawingPolicyFactory being affected by bUseAsOccluder
* This fixes preshadows on HISMC and foliage
Change 2880338 on 2016/02/24 by Martin.Mittring
added SkinCache.Debug cvar
#rb:Lina.Halper
#test:PC
Change 2880344 on 2016/02/24 by Daniel.Wright
Added the ability to apply DFAO to static indirect lighting, controlled by r.AOApplyToStaticIndirect
* Lightmaps, stationary skylight and reflection captures are all affected
* Specular occlusion on reflection captures requires a fair amount of tweaking of r.SkySpecularOcclusionStrength, MinOcclusion and MaxOcclusionDistance for good quality
* For now, a movable skylight with low intensity (.0001) must be placed to control MaxOcclusionDistance and MinOcclusion
Change 2880346 on 2016/02/24 by Daniel.Wright
Added several cvars to expose mesh distance field limits, which allows higher quality
* r.DistanceFields.MaxPerMeshResolution
* r.DistanceFields.DefaultVoxelDensity
* r.DistanceFields.AtlasSizeXY
* r.DistanceFields.AtlasSizeZ
Change 2881304 on 2016/02/25 by Gil.Gribb
UE4 - Increased the priority of cloth tasks because these are on the critical path.
Change 2881306 on 2016/02/25 by Gil.Gribb
UE4 - Added cvar to control background tick list cleanup.
Change 2881790 on 2016/02/25 by Daniel.Wright
Screen size fading is only applied to spot and point lights
Change 2882077 on 2016/02/25 by Daniel.Wright
DFAO indirect occlusion on static lighting is now correctly applied to IndirectIrradiance
Change 2882391 on 2016/02/25 by Martin.Mittring
fixed bad caching of SRV for vertexbuffers in SkinCache (caused rendering artifacts and wasteful memory allocations). Finding a SRV is now O(1), was O(n)
#rb:Olaf.Piesche
#code_review:Rolando.Caloca,Marcus.Wassmer
Change 2883008 on 2016/02/26 by Gil.Gribb
UE4 - Fixed recursive shader intialization crash on consoles.
Change 2883253 on 2016/02/26 by Martin.Mittring
Improved SkinTangent compression
#rb:Olaf.Piesche
Change 2883295 on 2016/02/26 by Martin.Mittring
Added RecomputeSkinTangent feature for GPU SkinCache, not enabled by default (r.SkinCache.RecomputeTangents)
#rb:Olaf.Piesche,Brian.Karis,Lina.Halper,Rolando.Caloca
Change 2883363 on 2016/02/26 by Gil.Gribb
UE4 - Fixed an issue with recurisve shader init on consoles...again.
Change 2883912 on 2016/02/26 by Gil.Gribb
UE4 - Fixed shadows updating static meshes while the prepass is in progress.
Change 2884829 on 2016/02/27 by Martin.Mittring
OR-16237 indirect lighting on skin is too dark
#rb:Martin.Mittring
#code_review:Brian.Karis
Change 2885096 on 2016/02/28 by Martin.Mittring
OR-13678
[CL 2890130 by Gil Gribb in Main branch]
2016-03-02 13:38:38 -05:00
|
|
|
switch (DOFQualityCVarValue)
|
|
|
|
|
{
|
|
|
|
|
case 0: VertexShader = SetShaderTempl<0, 0>(Context);
|
|
|
|
|
case 3: VertexShader = SetShaderTempl<0, 1>(Context); break;
|
|
|
|
|
case 4: VertexShader = SetShaderTempl<0, 2>(Context); break;
|
|
|
|
|
default: VertexShader = SetShaderTempl<0, 0>(Context);
|
|
|
|
|
}
|
|
|
|
|
|
2015-07-09 11:47:06 -04:00
|
|
|
}
|
|
|
|
|
|
2015-08-04 19:33:26 -04:00
|
|
|
DrawPostProcessPass(
|
2015-07-09 11:47:06 -04:00
|
|
|
Context.RHICmdList,
|
|
|
|
|
DestRect.Min.X, DestRect.Min.Y,
|
|
|
|
|
DestRect.Width() + 1, DestRect.Height() + 1,
|
|
|
|
|
SrcRect.Min.X, SrcRect.Min.Y,
|
|
|
|
|
SrcRect.Width() + 1, SrcRect.Height() + 1,
|
|
|
|
|
DestSize,
|
|
|
|
|
SrcSize,
|
2015-09-25 18:48:48 -04:00
|
|
|
VertexShader,
|
2015-08-04 19:33:26 -04:00
|
|
|
View.StereoPass,
|
|
|
|
|
Context.HasHmdMesh(),
|
2015-07-09 11:47:06 -04:00
|
|
|
EDRF_UseTriangleOptimization);
|
|
|
|
|
|
|
|
|
|
Context.RHICmdList.CopyToResolveTarget(DestRenderTarget0.TargetableTexture, DestRenderTarget0.ShaderResourceTexture, false, FResolveParams());
|
Copying //UE4/Orion-Staging to //UE4/Main (Source: //Orion/Dev-General @ 2949393)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2949393 on 2016/04/20 by Graeme.Thornton
Orion non-pak file security.
- Removed security bypass code from platform pak file
- Added a delegate to pak file code which allows the game to decide whether a file should be allowed or not
- Added an orion delegate which whitelists appropriate files
#rb robert.manuszewski
#tests win64 client + dedicated server. golden path.
Change 2949232 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: michael.noland
Paragon: Added a distinct menu frame rate limit, currently set to 60 fps and not visible in settings (if the user sets a game frame rate limit of below 60, we also clamp the menu limit to that threshold, so they can go down but not up for menus)
#jira OR-18017
#rb marcus.wassmer
#tests Ran paragon and switched between gameplay, menus, and replays, observing t.MaxFPS at different points
#ROBOMERGE-SOURCE: CL 2949231 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2949032 on 2016/04/19 by Zak.Middleton
#orion - Lower default NetUpdateFrequency for minions (10->6). Avoid excessive latency for some knockback/knockup abilities that would have noticeable lag by forcing an update sooner when they are triggered.
This should have the following effects:
1. Reduce server CPU cost (we tick minions at the net frequency).
2. Reduce server bandwidth
3. Reduce client CPU cost (we move character capsules and perform overlaps when new positions are received).
#rb Bart.Bressler, John.Pollard
#codereview Dmitry.Rekman
#tests MultiPIE AI lane, Replays
Change 2948966 on 2016/04/19 by Lina.Halper
Added log (check) of the asset info for Anim Per Track contains invalid format key
#rb: Michael.Noland
#code review: Martin.Wilson, Laurent.Delayen, Michael.Noland
#tests: editor/ cooked and test with AI_Tests with 10 bots.
Change 2948876 on 2016/04/19 by Michael.Noland
PS4: Validate that the texture pool size is not set to automatic (-1, which will crash later on as an attempt to allocate too much memory)
#rb none
#codereview marcus.wassmer
#tests Ran Paragon on PS4
Change 2948765 on 2016/04/19 by Daniel.Lamb
Removed AssetImportData tag from cooked asset registry builds.
#rb Andrew.Grant
#test Cook orion
Change 2948691 on 2016/04/19 by Marcus.Wassmer
Fix copytoresolvetarget ensure
#rb none
#test pc agora
Change 2948633 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: jason.bestimt
[AUTOMERGE]
Fix copytoresolve crash and change validation to ensure.
#test PC editor / PC golden path
#rb none
--------
Integrated using branch //Orion/Main_to_//Orion/Release-Next (reversed) of change#2948169 by Marcus.Wassmer on 2016/04/19 10:50:32.
#ROBOMERGE-SOURCE: CL 2948632 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2948507 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: andrew.grant
Merging 2937781 (Pak signing) using //Orion/Dev-General_to_Release
#rb none
#tests cooked client, checked game runs
#ROBOMERGE-SOURCE: CL 2948497 in //Orion/Release-0.24.1/... via CL 2948506
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2948431 on 2016/04/19 by Steve.Robb
CL#s 2919775 and 2942793 integrated to prevent annotation map performance problems on shutdown and asserts in PIE.
#codereview robert.manuszewski,bob.tellez
#rb bob.tellez
#tests Ran editor
Change 2948408 on 2016/04/19 by Leslie.Nivison
Adding .tps
#rb none
#test none
Change 2948185 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: chris.bunner
Fix for HLOD visibility freeze.
#tests Golden Path, Editor
#rb rolando.caloca, michael.noland
#lockdown andrew.grant
#jira OR-19863
#ROBOMERGE-SOURCE: CL 2948182 in //Orion/Release-0.24.1/... via CL 2948183
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2948149 on 2016/04/19 by Simon.Tovey
Fixed crash. Collision rendering path was not dealing with mesh batch with 0 triangles where other paths do.
#rb none
#tests No more crash
#codereview Marcus.Wassmer
Change 2948129 on 2016/04/19 by Lukasz.Furman
fixed gameplay debugger getting stuck with outdated data pack on client,
changed names of AI related debug cvars
#rb none
#tests game, PIE
#codereview Mieszko.Zielinski
Change 2948027 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: graeme.thornton
Fix for OR-20033 - CRASH: Client will crash with FRCPassPostProcessCircleDOFSetup
#rb none
#tests checked game runs without crashing
#ROBOMERGE-SOURCE: CL 2948017 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2947558 on 2016/04/18 by Matt.Kuhlenschmidt
Fix compile error
#rb none, #tests none
Change 2947509 on 2016/04/18 by Matt.Kuhlenschmidt
Added more logging to track down
https://jira.ol.epicgames.net/browse/OR-19841
#rb none, #tests none
Change 2947412 on 2016/04/18 by Ryan.Gerleve
Fix shadowed variable.
#rb none
#tests none
Change 2947377 on 2016/04/18 by Jamie.Dale
Gather paths are now sorted by fuzzy-ness, so that more specific includes beat less specific excludes
#rb Matt.Kuhlenschmidt
#tests Built for Windows. Ran a gather, and confirmed that explicitly included heroes were now gathered, and that generically excluded heroes were absent from the gather.
Change 2947351 on 2016/04/18 by Ryan.Gerleve
Allow overriding the demo.AsyncLoadWorld setting with a URL option when playing a replay.
Store the entire URL in the demo net driver instead of just the map name, so that the options can be accessed later.
#tests golden path, replays
#rb john.pollard
Change 2947103 on 2016/04/18 by david.nikdel
#ROBOMERGE-AUTHOR: jason.bestimt
#ORION_MAIN - Merge 24.1 @ CL 2947071
#RB:none
#Tests:none
#ROBOMERGE-SOURCE: CL 2947102 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2947007 on 2016/04/18 by Zak.Middleton
#ue4 - Improve linear smoothing in the presence of low net frequency updates.
#rb Bart.Bressler
#tests MultiPIE AI with lanes
Change 2946994 on 2016/04/18 by Mieszko.Zielinski
Improvements to NavigationSystem's "abstract navigation data" support #UE4
#rb Lukasz.Furman
#test golden path
Change 2946760 on 2016/04/18 by Chris.Bunner
Fixing up bad merge, recommit of CL 2819472 - ForceLOD now clamps to available LODs on primitive, i.e. use MinLOD rather than not drawing at all.
#tests Editor
#rb None
Change 2946745 on 2016/04/18 by david.nikdel
#ROBOMERGE-AUTHOR: jason.bestimt
#ORION_MAIN - Merge 24.1 @ CL 2946637
#RB:none
#Tests:none
#ROBOMERGE-SOURCE: CL 2946656 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2946645 on 2016/04/18 by Richard.Fawcett
When promoting a buidl to staged, prevent enumeration of files already in S3
Enumerating files in S3 is a slow process, and it turns out that simply uploading all chunks blindly is more efficient than enumerating existing chunks and selectively uploading only the new ones.
#rb Leigh.Swift
#tests This technique has already been used in launcher promotions for several months
Change 2946622 on 2016/04/18 by Richard.Fawcett
By default, when enumerating chunks from a manifest file, skip checking they exist on disk at enumeration time.
This will fail anyway further down the line if the files don't exist, but will improve speed of stage promotions by around five minutes. In practice, we have NEVER seen a job fail at this point because of the existence check.
#rb Leigh.Swift
#tests Ensure that output of ExtractDataFilenamesFromManifest method is identical both with and without bSkipExistsCheck specified.
Change 2945812 on 2016/04/15 by Daniel.Lamb
Fixed error in diff cooked build commandlet.
#rb ben.marsh
#test Compile.
Change 2945110 on 2016/04/15 by Matt.Kuhlenschmidt
Fix crash exporting actors with non-scene components to fbx
#rb none, #tests full scene exporting on maps that crashed
#codereview alexis.matte
Change 2945078 on 2016/04/15 by Simon.Tovey
Fix for OR-19778
When some pooled systems are reused, on init they have a non zero lod level but the emitter instances are created at LOD 0 initially.
So the component did not think it had to update it's LOD but the emitters were not at the correct LOD.
Have forced a LOD set on init when the component LOD is non-zero.
#rb none
#tests Works in editor and game.
#codereview Olaf.Piesche
Change 2944664 on 2016/04/14 by Uriel.Doyon
Fix to SM4 compilation issue
#jira OR-19706
#rb marcus.wassmer
#tests tested editor in SM4 and SM5
Change 2944642 on 2016/04/14 by Lukasz.Furman
changed waypoint switch conditions in meta nav paths
#rb none
#tests PIE
#codereview Mieszko.Zielinski
Change 2944599 on 2016/04/14 by david.nikdel
#ROBOMERGE-AUTHOR: andrew.grant
Added sha1 to UnrealPak list output
#rb none
#tests listed content of pakfile
#ROBOMERGE-SOURCE: CL 2944595 in //Orion/Release-0.24/... via CL 2944597 via CL 2944598
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2944441 on 2016/04/14 by Marcus.Wassmer
Duplicate change to output shader compiler errors.
#rb none
#test run PC and see errors.
Change 2944437 on 2016/04/14 by John.Pollard
Possible fix for https://jira.ol.epicgames.net/browse/OR-19614
#rb JoshM
#codereview Josh.Markiewicz
#tests Golden path matchmaking
Change 2944430 on 2016/04/14 by david.nikdel
#ROBOMERGE-AUTHOR: michael.noland
Engine: Added support for more/fewer settings in individual categories to the editor scalability control widget
#rb david.ratti
#tests Tested in the editor
#ROBOMERGE-SOURCE: CL 2944428 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2944198 on 2016/04/14 by David.Ratti
Paragon - register for slow/stun/root/silence callbacks on any tag count change, not just add/remove. This is so the UI will update if you get another stack of a stackable slow GE.
Ability system - unify client stack count change code path with server. Client now properly update owner ASC's tag map and broadcasts all delegates there.
#rb dayY
#tests pie
Change 2944124 on 2016/04/14 by Wes.Hunt
Change the TPS redirects for DX modules to point to the proper DX redist TPS which is what packaged games will need.
#codereview:leslie.nivison
#rb none
#tests ran UAT ListThirdPartySoftware <for Orion>
Change 2944107 on 2016/04/14 by Wes.Hunt
MeshUtilities now depends on new module nvTessLib to better track the third party dependency.
#codereview:daniel.wright
#rb none
#tests build OrionClient/Editor for Win64
Change 2944102 on 2016/04/14 by Wes.Hunt
Tweak to UBT -ListBuildFolders to do a distinct in a better place to cut down on duplicate module searches.
#tests ran the UBT command
#rb none
Change 2943851 on 2016/04/14 by Ryan.Gerleve
Fix the ForEachNetDriver helper function to get the world context directly off the world instead of going through the game instance. Ensures the correct net drivers will be used when there are multiple worlds but only one game instance.
#rb john.pollard
#tests golden path, replays, PIE
Change 2943847 on 2016/04/14 by Ryan.Gerleve
Fixes to support client replay recording & playback in another world:
When recording a replay, only swap actor roles if the remote role is ROLE_Authority
When loading a replay checkpoint, call NetworkRemapPath to make sure paths have the correct name in the GuidCache
#rb john.pollard
#tests golden path, replays, PIE
Change 2943691 on 2016/04/14 by david.nikdel
#ROBOMERGE-AUTHOR: jason.bestimt
#ORION_24 - Fix for OR-19609, OR-19610, and OR-19611
#RB:none
#Tests:none
#ROBOMERGE-SOURCE: CL 2943687 in //Orion/Release-0.24/... via CL 2943688
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2943508 on 2016/04/14 by Richard.Fawcett
Automation: Add support for multipart file uploads to Amazon S3 to increase speed of large file uploads.
#jira OPPBUILD-44
#rb Leigh.Swift
#tests Uploaded files to S3 using the new routines, downlaoded via AWS management console and ensured downloaded files identical to uploaded ones
Change 2943274 on 2016/04/13 by jason.bestimt
#ORION_MAIN - Merge 24 @ CL 2943257
#RB:none
#Tests:none
#ROBOMERGE-SOURCE: CL 2943271 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
#ROBOMERGE-SAYS: Beep boop! I couldn't merge this change. Please do it yourself, human.
#CodeReview: david.nikdel, jason.bestimt
Change 2943178 on 2016/04/13 by Olaf.Piesche
Bumping size of the particle curve texture to 512x512
#rb martin.mittring
#tests PC Editor, Game
Change 2943174 on 2016/04/13 by Aaron.McLeran
OR-19392 Ensure condition failed: (*RequiresInitialization == 0) on loading into PVP match
- Removing ensure since there is a rare edge case where it's possible for a sound looping node may get ResetChildren called twice.
- Condition is when a child random node o fa looping node has a blank entry and results in no sound chosen in a given frame (which results in ResetChildren getting called). Later in the frame, if a sound had previously been playing with an active sound, it will have stop called on it, which will call NotifyWaveInstanceFinished and hit the ensure. Simply using the branch to check if the looping node has been initialized will work fine in this and other cases.
#codereview Bob.Tellez
#rb Bob.Tellez
#tests ran orion with this change testing problematic sound cue
Change 2943042 on 2016/04/13 by Rob.Cannaday
Fix crash in HTTP completion delegates on shutdown
Stop ticking HTTP retry manager after FOnlineSubsystemImpl::Shutdown has been called
#rb josh.markiewicz
#tests shutting down multiple times
Change 2942913 on 2016/04/13 by Lukasz.Furman
added meta navmesh paths
#orion
#rb Mieszko.Zielinski
#tests PIE
Change 2942132 on 2016/04/13 by Wes.Hunt
Enable UBT -ListBuildFolders to operate on Mac and iOS platforms without having to fully set up the remote environment.
#codereview:leslie.nivison
#rb peter.sauerbrei
#tests running UBT with and without -listbuildfolders
Change 2941651 on 2016/04/12 by Jason.Bestimt
#ORION_DG - Merge MAIN @ CL 2941645
#RB:none
#Tests:none
Change 2941539 on 2016/04/12 by Laurent.Delayen
FABRIK: Normalize outgoing rotations.
Fixes Chains Q ability crashing.
#rb none
#tests Chains not crashing
Change 2941469 on 2016/04/12 by Wes.Hunt
Fix UBT -ListBuildFolders to not prep target for deployment.
#codereview:leslie.nivison
#rb none
#tests tested -ListBuildFolders for Android
Change 2941434 on 2016/04/12 by Leslie.Nivison
Adding/cleaning up .tps files
#rb none
#test none
Change 2941241 on 2016/04/12 by Daniel.Lamb
Removed shadername from the shader code to fix deterministic material cooking issue.
#jira UE-29320
#codereview Marcus.Wassmer
#rb Marcus.Wassmer
#test Running editor, cooking orion.
Change 2941046 on 2016/04/12 by Laurent.Delayen
Added safety net for non state AnimNotifies having a non-zero EndTriggerTimeOffset.
Fixes Twinblast double shot for the left primary attack.
#rb benn.gallagher
#codereview lina.halper, ray.arnett, aaron.eady
#tests twinblast's LMB
Change 2941032 on 2016/04/12 by Jason.Bestimt
#ORION_24 - Merge MAIN @ CL 2940950
#RB:none
#Tests:none
[CL 2952833 by Andrew Grant in Main branch]
2016-04-22 11:21:10 -04:00
|
|
|
|
|
|
|
|
if (DestRenderTarget1.TargetableTexture)
|
|
|
|
|
{
|
|
|
|
|
Context.RHICmdList.CopyToResolveTarget(DestRenderTarget1.TargetableTexture, DestRenderTarget1.ShaderResourceTexture, false, FResolveParams());
|
|
|
|
|
}
|
2015-07-09 11:47:06 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FPooledRenderTargetDesc FRCPassPostProcessCircleDOF::ComputeOutputDesc(EPassOutputId InPassOutputId) const
|
|
|
|
|
{
|
|
|
|
|
FPooledRenderTargetDesc Ret = GetInput(ePId_Input0)->GetOutput()->RenderTargetDesc;
|
|
|
|
|
|
|
|
|
|
Ret.Extent.X = FMath::Max(1, Ret.Extent.X);
|
|
|
|
|
Ret.Extent.Y = FMath::Max(1, Ret.Extent.Y);
|
|
|
|
|
|
|
|
|
|
Ret.Reset();
|
|
|
|
|
Ret.TargetableFlags &= ~(uint32)TexCreate_UAV;
|
|
|
|
|
Ret.TargetableFlags |= TexCreate_RenderTargetable;
|
|
|
|
|
|
|
|
|
|
Ret.DebugName = (InPassOutputId == ePId_Output0) ? TEXT("CircleDOF0") : TEXT("CircleDOF1");
|
|
|
|
|
|
|
|
|
|
// more precision for additive blending and we need the alpha channel
|
|
|
|
|
Ret.Format = PF_FloatRGBA;
|
|
|
|
|
|
|
|
|
|
return Ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Encapsulates the Circle DOF recombine pixel shader. */
|
2015-10-28 08:58:16 -04:00
|
|
|
template <uint32 NearBlurEnable, uint32 Quality>
|
2015-07-09 11:47:06 -04:00
|
|
|
class FPostProcessCircleDOFRecombinePS : public FGlobalShader
|
|
|
|
|
{
|
|
|
|
|
DECLARE_SHADER_TYPE(FPostProcessCircleDOFRecombinePS, Global);
|
|
|
|
|
|
|
|
|
|
static bool ShouldCache(EShaderPlatform Platform)
|
|
|
|
|
{
|
2015-07-14 14:11:35 -04:00
|
|
|
return IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM4);
|
2015-07-09 11:47:06 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void ModifyCompilationEnvironment(EShaderPlatform Platform, FShaderCompilerEnvironment& OutEnvironment)
|
|
|
|
|
{
|
|
|
|
|
FGlobalShader::ModifyCompilationEnvironment(Platform,OutEnvironment);
|
|
|
|
|
OutEnvironment.SetDefine(TEXT("ENABLE_NEAR_BLUR"), NearBlurEnable);
|
2015-10-28 08:58:16 -04:00
|
|
|
OutEnvironment.SetDefine(TEXT("QUALITY"), Quality);
|
2015-07-09 11:47:06 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Default constructor. */
|
|
|
|
|
FPostProcessCircleDOFRecombinePS() {}
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
FPostProcessPassParameters PostprocessParameter;
|
|
|
|
|
FDeferredPixelShaderParameters DeferredParameters;
|
|
|
|
|
FShaderParameter DepthOfFieldUVLimit;
|
|
|
|
|
FShaderParameter RandomOffset;
|
|
|
|
|
|
|
|
|
|
/** Initialization constructor. */
|
|
|
|
|
FPostProcessCircleDOFRecombinePS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
|
|
|
|
|
: FGlobalShader(Initializer)
|
|
|
|
|
{
|
|
|
|
|
PostprocessParameter.Bind(Initializer.ParameterMap);
|
|
|
|
|
DeferredParameters.Bind(Initializer.ParameterMap);
|
|
|
|
|
DepthOfFieldUVLimit.Bind(Initializer.ParameterMap,TEXT("DepthOfFieldUVLimit"));
|
|
|
|
|
RandomOffset.Bind(Initializer.ParameterMap, TEXT("RandomOffset"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// FShader interface.
|
|
|
|
|
virtual bool Serialize(FArchive& Ar) override
|
|
|
|
|
{
|
|
|
|
|
bool bShaderHasOutdatedParameters = FGlobalShader::Serialize(Ar);
|
2015-10-31 10:55:13 -04:00
|
|
|
Ar << PostprocessParameter << DeferredParameters << DepthOfFieldUVLimit << RandomOffset;
|
2015-07-09 11:47:06 -04:00
|
|
|
return bShaderHasOutdatedParameters;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SetParameters(const FRenderingCompositePassContext& Context)
|
|
|
|
|
{
|
|
|
|
|
FSceneRenderTargets& SceneContext = FSceneRenderTargets::Get(Context.RHICmdList);
|
|
|
|
|
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
|
|
|
|
|
|
|
|
|
|
FGlobalShader::SetParameters(Context.RHICmdList, ShaderRHI, Context.View);
|
|
|
|
|
|
|
|
|
|
DeferredParameters.Set(Context.RHICmdList, ShaderRHI, Context.View);
|
|
|
|
|
PostprocessParameter.SetPS(ShaderRHI, Context, TStaticSamplerState<SF_Bilinear,AM_Clamp,AM_Clamp,AM_Clamp>::GetRHI());
|
|
|
|
|
|
|
|
|
|
// Compute out of bounds UVs in the source texture.
|
|
|
|
|
FVector4 Bounds;
|
|
|
|
|
Bounds.X = (((float)((Context.View.ViewRect.Min.X + 1) & (~1))) + 3.0f) / ((float)(SceneContext.GetBufferSizeXY().X));
|
|
|
|
|
Bounds.Y = (((float)((Context.View.ViewRect.Min.Y + 1) & (~1))) + 3.0f) / ((float)(SceneContext.GetBufferSizeXY().Y));
|
|
|
|
|
Bounds.Z = (((float)(Context.View.ViewRect.Max.X & (~1))) - 3.0f) / ((float)(SceneContext.GetBufferSizeXY().X));
|
|
|
|
|
Bounds.W = (((float)(Context.View.ViewRect.Max.Y & (~1))) - 3.0f) / ((float)(SceneContext.GetBufferSizeXY().Y));
|
|
|
|
|
|
|
|
|
|
SetShaderValue(Context.RHICmdList, ShaderRHI, DepthOfFieldUVLimit, Bounds);
|
|
|
|
|
|
|
|
|
|
FVector2D RandomOffsetValue;
|
|
|
|
|
TemporalRandom2(&RandomOffsetValue, Context.View.Family->FrameNumber);
|
|
|
|
|
SetShaderValue(Context.RHICmdList, ShaderRHI, RandomOffset, RandomOffsetValue);
|
|
|
|
|
}
|
2015-10-28 08:58:16 -04:00
|
|
|
|
|
|
|
|
static const TCHAR* GetSourceFilename()
|
|
|
|
|
{
|
|
|
|
|
return TEXT("PostProcessCircleDOF");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const TCHAR* GetFunctionName()
|
|
|
|
|
{
|
|
|
|
|
return TEXT("MainCircleRecombinePS");
|
|
|
|
|
}
|
2015-07-09 11:47:06 -04:00
|
|
|
};
|
|
|
|
|
|
2015-10-28 08:58:16 -04:00
|
|
|
|
|
|
|
|
// #define avoids a lot of code duplication
|
|
|
|
|
#define VARIATION1(A, B) typedef FPostProcessCircleDOFRecombinePS<A, B> FPostProcessCircleDOFRecombinePS##A##B; \
|
|
|
|
|
IMPLEMENT_SHADER_TYPE2(FPostProcessCircleDOFRecombinePS##A##B, SF_Pixel);
|
|
|
|
|
|
|
|
|
|
VARIATION1(0,0) VARIATION1(1,0)
|
|
|
|
|
VARIATION1(0,1) VARIATION1(1,1)
|
|
|
|
|
|
|
|
|
|
#undef VARIATION1
|
|
|
|
|
|
|
|
|
|
template <uint32 NearBlurEnable, uint32 Quality>
|
|
|
|
|
FShader* FRCPassPostProcessCircleDOFRecombine::SetShaderTempl(const FRenderingCompositePassContext& Context)
|
|
|
|
|
{
|
|
|
|
|
TShaderMapRef<FPostProcessVS> VertexShader(Context.GetShaderMap());
|
|
|
|
|
TShaderMapRef<FPostProcessCircleDOFRecombinePS<NearBlurEnable, Quality> > PixelShader(Context.GetShaderMap());
|
|
|
|
|
|
|
|
|
|
static FGlobalBoundShaderState BoundShaderState;
|
|
|
|
|
|
|
|
|
|
SetGlobalBoundShaderState(Context.RHICmdList, Context.GetFeatureLevel(), BoundShaderState, GFilterVertexDeclaration.VertexDeclarationRHI, *VertexShader, *PixelShader);
|
|
|
|
|
|
|
|
|
|
VertexShader->SetParameters(Context);
|
|
|
|
|
PixelShader->SetParameters(Context);
|
|
|
|
|
|
|
|
|
|
return *VertexShader;
|
|
|
|
|
}
|
2015-07-09 11:47:06 -04:00
|
|
|
|
|
|
|
|
void FRCPassPostProcessCircleDOFRecombine::Process(FRenderingCompositePassContext& Context)
|
|
|
|
|
{
|
|
|
|
|
SCOPED_DRAW_EVENT(Context.RHICmdList, CircleDOFRecombine);
|
|
|
|
|
|
|
|
|
|
const FPooledRenderTargetDesc* InputDesc = GetInputDesc(ePId_Input0);
|
|
|
|
|
|
|
|
|
|
if(!InputDesc)
|
|
|
|
|
{
|
|
|
|
|
// input is not hooked up correctly
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const FSceneView& View = Context.View;
|
|
|
|
|
|
|
|
|
|
const auto FeatureLevel = Context.GetFeatureLevel();
|
|
|
|
|
auto ShaderMap = Context.GetShaderMap();
|
|
|
|
|
|
|
|
|
|
FIntPoint TexSize = InputDesc->Extent;
|
|
|
|
|
|
|
|
|
|
// usually 1, 2, 4 or 8
|
|
|
|
|
uint32 ScaleToFullRes = FSceneRenderTargets::Get(Context.RHICmdList).GetBufferSizeXY().X / TexSize.X;
|
|
|
|
|
|
|
|
|
|
FIntRect HalfResViewRect = View.ViewRect / ScaleToFullRes;
|
|
|
|
|
|
|
|
|
|
const FSceneRenderTargetItem& DestRenderTarget = PassOutputs[0].RequestSurface(Context);
|
|
|
|
|
|
|
|
|
|
// Set the view family's render target/viewport.
|
|
|
|
|
SetRenderTarget(Context.RHICmdList, DestRenderTarget.TargetableTexture, FTextureRHIRef());
|
|
|
|
|
|
|
|
|
|
// is optimized away if possible (RT size=view size, )
|
|
|
|
|
Context.RHICmdList.Clear(true, FLinearColor::Black, false, 1.0f, false, 0, View.ViewRect);
|
|
|
|
|
|
|
|
|
|
Context.SetViewportAndCallRHI(View.ViewRect);
|
|
|
|
|
|
|
|
|
|
// set the state
|
|
|
|
|
Context.RHICmdList.SetBlendState(TStaticBlendState<>::GetRHI());
|
|
|
|
|
Context.RHICmdList.SetRasterizerState(TStaticRasterizerState<>::GetRHI());
|
|
|
|
|
Context.RHICmdList.SetDepthStencilState(TStaticDepthStencilState<false, CF_Always>::GetRHI());
|
|
|
|
|
|
2015-10-28 08:58:16 -04:00
|
|
|
static const auto CVar = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.DepthOfFieldQuality"));
|
|
|
|
|
check(CVar);
|
|
|
|
|
int32 DOFQualityCVarValue = CVar->GetValueOnRenderThread();
|
|
|
|
|
|
|
|
|
|
// 0:normal / 1:slow but very high quality
|
|
|
|
|
uint32 Quality = DOFQualityCVarValue >= 3;
|
|
|
|
|
|
|
|
|
|
FShader* VertexShader = 0;
|
2015-07-09 11:47:06 -04:00
|
|
|
|
|
|
|
|
if (bNearBlurEnabled)
|
|
|
|
|
{
|
2015-10-28 08:58:16 -04:00
|
|
|
if(Quality) VertexShader = SetShaderTempl<1, 1>(Context);
|
|
|
|
|
else VertexShader = SetShaderTempl<1, 0>(Context);
|
2015-07-09 11:47:06 -04:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2015-10-28 08:58:16 -04:00
|
|
|
if(Quality) VertexShader = SetShaderTempl<0, 1>(Context);
|
|
|
|
|
else VertexShader = SetShaderTempl<0, 0>(Context);
|
2015-07-09 11:47:06 -04:00
|
|
|
}
|
|
|
|
|
|
2015-08-04 19:33:26 -04:00
|
|
|
DrawPostProcessPass(
|
2015-07-09 11:47:06 -04:00
|
|
|
Context.RHICmdList,
|
|
|
|
|
0, 0,
|
|
|
|
|
View.ViewRect.Width(), View.ViewRect.Height(),
|
|
|
|
|
View.ViewRect.Min.X, View.ViewRect.Min.Y,
|
|
|
|
|
View.ViewRect.Width(), View.ViewRect.Height(),
|
|
|
|
|
View.ViewRect.Size(),
|
|
|
|
|
TexSize,
|
2015-10-28 08:58:16 -04:00
|
|
|
VertexShader,
|
2015-08-04 19:33:26 -04:00
|
|
|
View.StereoPass,
|
|
|
|
|
Context.HasHmdMesh(),
|
2015-07-09 11:47:06 -04:00
|
|
|
EDRF_UseTriangleOptimization);
|
|
|
|
|
|
|
|
|
|
Context.RHICmdList.CopyToResolveTarget(DestRenderTarget.TargetableTexture, DestRenderTarget.ShaderResourceTexture, false, FResolveParams());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FPooledRenderTargetDesc FRCPassPostProcessCircleDOFRecombine::ComputeOutputDesc(EPassOutputId InPassOutputId) const
|
|
|
|
|
{
|
|
|
|
|
FPooledRenderTargetDesc Ret = GetInput(ePId_Input0)->GetOutput()->RenderTargetDesc;
|
|
|
|
|
|
|
|
|
|
Ret.Reset();
|
|
|
|
|
Ret.DebugName = TEXT("CircleDOFRecombine");
|
|
|
|
|
|
|
|
|
|
return Ret;
|
|
|
|
|
}
|