2016-01-07 08:17:16 -05:00
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
2014-03-14 14:13:41 -04:00
/*=============================================================================
PostProcessCommon.usf: PostProcessing shared functions and structures.
=============================================================================*/
#ifndef __POST_PROCESS_COMMON__
#define __POST_PROCESS_COMMON__
2014-10-01 11:09:15 -04:00
/// e.g.
// PostprocessInput0.SampleLevel(PostprocessInput0Sampler, float2 UV, 0)
// Texture2DSample(PostprocessInput0, PostprocessInput0Sampler, float2 UV)
// PostprocessInput0.Load(Texel.xyz)
// PostprocessInput0.GetDimensions(uint, out uint width, out uint height, out uint levels)
// PostprocessInput0.GetDimensions(uint, out float width, out float height, out float levels)
// PostprocessInput0.GetDimensions(out uint width, out uint height)
// PostprocessInput0.GetDimensions(out float width, out float height)
2014-03-14 14:13:41 -04:00
Texture2D PostprocessInput0;
SamplerState PostprocessInput0Sampler;
Texture2D PostprocessInput1;
SamplerState PostprocessInput1Sampler;
Texture2D PostprocessInput2;
SamplerState PostprocessInput2Sampler;
Texture2D PostprocessInput3;
SamplerState PostprocessInput3Sampler;
Texture2D PostprocessInput4;
SamplerState PostprocessInput4Sampler;
Texture2D PostprocessInput5;
SamplerState PostprocessInput5Sampler;
Texture2D PostprocessInput6;
SamplerState PostprocessInput6Sampler;
// width, height, 1/width, 1/height
float4 PostprocessInput0Size;
float4 PostprocessInput1Size;
float4 PostprocessInput2Size;
float4 PostprocessInput3Size;
float4 PostprocessInput4Size;
float4 PostprocessInput5Size;
float4 PostprocessInput6Size;
// xy = min valid UV in PostprocessInput%d, zw = max valid UV.
float4 PostprocessInput0MinMax;
float4 PostprocessInput1MinMax;
float4 PostprocessInput2MinMax;
float4 PostprocessInput3MinMax;
float4 PostprocessInput4MinMax;
float4 PostprocessInput5MinMax;
float4 PostprocessInput6MinMax;
2015-01-25 16:45:04 -05:00
// viewport width, height, 1/width, 1/height (scaled to the current rendertarget resolution), depends on SetViewportAndCallRHI() call
2014-03-14 14:13:41 -04:00
float4 ViewportSize;
2015-01-25 16:45:04 -05:00
// in pixels (scaled to the current rendertarget resolution), float4(minx,miny,maxx,maxy), depends on SetViewportAndCallRHI() call
2015-06-22 19:08:33 -04:00
uint4 ViewportRect;
2014-03-14 14:13:41 -04:00
SamplerState BilinearTextureSampler0;
SamplerState BilinearTextureSampler1;
// transforms ScreenPos to the screen pixel position, not the viewport local position (*xy +wz)
2015-01-23 17:46:41 -05:00
// (0,0) left top, (width-1,height-1) at right bottom, in pixels (without offset to reach the pixel center)
// use ComputePixelPosCenter(UVAndScreenPos.zw, bPixelCenter) instead of directly accessing this
2014-03-14 14:13:41 -04:00
float4 ScreenPosToPixel;
2015-01-23 17:46:41 -05:00
// uses ScreenPosToPixel which is setup in FPostProcessPassParameters
2015-09-18 12:10:27 -04:00
// for integer output bPixelCenter should be set to true (to avoid rounding errors), but often it's better to use "int2 PixelPos = (int2)SvPosition.xy;" instead
2015-01-23 17:46:41 -05:00
// @param ScreenPos -1 .. 1, usually from UVAndScreenPos.zw
// @param bCenter false: left top of the pixel and almost no fractional value, true: added 0.5 to be pixel center
float2 ComputePixelPosCenter(float2 ScreenPos, bool bPixelCenter)
{
float2 PixelOffset = bPixelCenter ? 0.5f : 0.0f;
return ScreenPos * ScreenPosToPixel.xy + ScreenPosToPixel.zw + PixelOffset;
}
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
// not well optimized but can be useful
float2 ScreenPosFromPixelPos(float2 PixelPos, bool bPixelCenter)
{
float2 PixelOffset = bPixelCenter ? 0.5f : 0.0f;
return (PixelPos - PixelOffset - ScreenPosToPixel.zw) / ScreenPosToPixel.xy;
}
2014-03-14 14:13:41 -04:00
// shape of the lens for vignette like effects and masking
// @param ScreenPos -1 .. 1
// @return 0..1 0:borders, 1:center
float DiscMask(float2 ScreenPos)
{
float x = saturate(1.0f - dot(ScreenPos, ScreenPos));
return x * x;
}
// black on the borders
// @param ScreenPos -1 .. 1
// @return 0..1 0:borders, 1:center
float RectMask(float2 ScreenPos)
{
float2 UV = saturate(ScreenPos * 0.5 + 0.5f);
float2 Mask2 = UV * (1 - UV);
return Mask2.x * Mask2.y * 8.0f;
}
// for rectangles with border
// @return >=0, 0 if inside
float ComputeDistanceToRect(int2 Pos, int2 LeftTop, int2 Extent, bool bRoundBorders = true)
{
int2 RightBottom = LeftTop + Extent - 1;
// use int for more precision
int2 Rel = max(int2(0, 0), Pos - RightBottom) + max(int2(0, 0), LeftTop - Pos);
if(bRoundBorders)
{
// euclidian distance (round corners)
return length((float2)Rel);
}
else
{
// manhatten distance (90 degree corners)
return max(Rel.x, Rel.y);
}
}
float4 MappingPolynomial; // RGB = a, b, c where y = a * x*x + b * x + c
// @param InLDRColor needs to be LDR (0..1) and in linear space
half3 ColorCorrection(half3 InLDRColor)
{
// final color correction to adjust for hardware differences, to make quick adjustements before a demo or simply a user setting
return MappingPolynomial.x * (InLDRColor * InLDRColor) + MappingPolynomial.y * InLDRColor + MappingPolynomial.z;
}
// Generate a mask to darken the screen borders.
// (Camera artifact and artistic effect)
Copying //UE4/Orion-Staging to //UE4/Main (originated from //Orion/Dev-General @ 2831630)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2831624 on 2016/01/17 by Marcus.Wassmer
Merge disable of FCachedReadPlatformData on PS4. Reduces memory spikes. 2830986
#rb none
#test none
#codereview Michael.Noland,James.Golding
Change 2831402 on 2016/01/17 by Marcus.Wassmer
HLOD priority and streamout changes.
Give texture pool an extra 200MB which we can afford thanks to James/Michael
#rb Chris.Gagnon
#test run agora, notice nice textures.
#lockdown Andrew.Grant
Change 2831398 on 2016/01/17 by Marcus.Wassmer
Fix 3 logic bugs with Relocate
#rb chris.gagnon
#test run game, look for corruption.
#lockdown Andrew.Grant
Change 2831372 on 2016/01/16 by Marcus.Wassmer
Update param.sfo's and lockdown version in prep for good PS4 playtest build.
#rb none
#test build from last night...
#lockdown Andrew.Grant
Change 2831274 on 2016/01/16 by Graeme.Thornton
Disable platform file cache wrapper on PS4
#codereview James.Golding
#rb none
#tests ran cooked ps4 build, timed loading (no real change), measured memory used for file handles (small)
Change 2831237 on 2016/01/16 by Sammy.James
Fix PS4 compile error
#codereview Andrew.Grant
#rb none
#tests none
Change 2831219 on 2016/01/16 by Matt.Kuhlenschmidt
Fix possible invalid access to shared movie player resource across threads causing startup crash.
#codereview marcus.wassmer
#rb none, #tests initial load
Change 2831218 on 2016/01/16 by Marcus.Wassmer
Fix bad warning case.
#codereview Martin.Mittring
#rb none
#test none
Change 2831201 on 2016/01/16 by Andrew.Grant
Added extra info about referencer to missing asset reference message
#rb none
#tests cooked, ran editor
Change 2831183 on 2016/01/16 by David.Nikdel
#OSS #PS4 #Purchasing #StoreV2
- Force failure if we have no receipts after a "successful" checkout.
- Report consumed entitlements as well as unconsumed but leave ValidationInfo empty so we can tell the difference at the application level
- Convert productIds to skuIds at checkout time
- Added PS4 Implementation of IOnlineStoreV2
- Bugfix: set bSuccessfullyStartedUp=false when InitNPGameSettings() fails
- Adjusted FOnlineStoreOffer to use FText::AsCurrencyBase
#RB: Paul.Moore
#TESTS: login, purchase redemption, store MTX purchasing on PS4 & PC
Change 2831129 on 2016/01/16 by David.Nikdel
#MCP
- Added a ctor to make converting from FOnlineError to FMcpQueryResult easier (for stuff that was already using FMcpQueryResult).
#RB: none
#TESTS: frontend
Change 2830986 on 2016/01/15 by Michael.Noland
PS4: Disabling FCachedReadPlatformFile on PS4 to significantly reduce high watermark memory consumption during blocking loads
#rb marcus.wassmer
#tests Ran Paragon PS4 down a bad path that currently does a blocking map and hero load
#lockdown andrew.grant
Change 2830943 on 2016/01/15 by Max.Chen
Sequencer: Fix bug introduced with preroll. It was also causing a crash in particle track instance.
#tests Master sequence trailer plays without crashing
#rb none
Change 2830912 on 2016/01/15 by Michael.Noland
Rendering: Exposed GRHIDeviceId (only filled in on D3D11 and D3D12 RHI's under the same circumstances as GRHIAdapterName, etc..., 0 otherwise)
#rb mieszko.zielinski
#tests Tested printing the value out
#codereview martin.mittring
Change 2830910 on 2016/01/15 by Michael.Noland
Rendering: Improved GPU driver detection logic to handle more cases
#codereview martin.mittring
#rb mieszko.zielinski
#tests Tested on my machine which was previous reporting Unknown for the values as some entries contained the key in the Settings subfolder
Change 2830776 on 2016/01/15 by Martin.Mittring
from Dev-Rendering
added ensure to track down multiple issues like
OR-11771 CRASH: User Crashed when pressing the Play button
OR-12430 CRASH: OT2 user crashed with FRHIResource::AddRef()
#rb:Gil.Gribb
#code_review:Gil.Gribb,Mark.Satterthwaite,Marcus.Wassmer
2016-01-20 11:32:08 -05:00
// @param VignetteCircleSpacePos from VignetteSpace()
float ComputeVignetteMask(float2 VignetteCircleSpacePos, float Intensity)
2014-03-14 14:13:41 -04:00
{
2015-04-28 15:27:19 -04:00
// Natural vignetting
// cosine-fourth law
Copying //UE4/Orion-Staging to //UE4/Main (originated from //Orion/Dev-General @ 2831630)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2831624 on 2016/01/17 by Marcus.Wassmer
Merge disable of FCachedReadPlatformData on PS4. Reduces memory spikes. 2830986
#rb none
#test none
#codereview Michael.Noland,James.Golding
Change 2831402 on 2016/01/17 by Marcus.Wassmer
HLOD priority and streamout changes.
Give texture pool an extra 200MB which we can afford thanks to James/Michael
#rb Chris.Gagnon
#test run agora, notice nice textures.
#lockdown Andrew.Grant
Change 2831398 on 2016/01/17 by Marcus.Wassmer
Fix 3 logic bugs with Relocate
#rb chris.gagnon
#test run game, look for corruption.
#lockdown Andrew.Grant
Change 2831372 on 2016/01/16 by Marcus.Wassmer
Update param.sfo's and lockdown version in prep for good PS4 playtest build.
#rb none
#test build from last night...
#lockdown Andrew.Grant
Change 2831274 on 2016/01/16 by Graeme.Thornton
Disable platform file cache wrapper on PS4
#codereview James.Golding
#rb none
#tests ran cooked ps4 build, timed loading (no real change), measured memory used for file handles (small)
Change 2831237 on 2016/01/16 by Sammy.James
Fix PS4 compile error
#codereview Andrew.Grant
#rb none
#tests none
Change 2831219 on 2016/01/16 by Matt.Kuhlenschmidt
Fix possible invalid access to shared movie player resource across threads causing startup crash.
#codereview marcus.wassmer
#rb none, #tests initial load
Change 2831218 on 2016/01/16 by Marcus.Wassmer
Fix bad warning case.
#codereview Martin.Mittring
#rb none
#test none
Change 2831201 on 2016/01/16 by Andrew.Grant
Added extra info about referencer to missing asset reference message
#rb none
#tests cooked, ran editor
Change 2831183 on 2016/01/16 by David.Nikdel
#OSS #PS4 #Purchasing #StoreV2
- Force failure if we have no receipts after a "successful" checkout.
- Report consumed entitlements as well as unconsumed but leave ValidationInfo empty so we can tell the difference at the application level
- Convert productIds to skuIds at checkout time
- Added PS4 Implementation of IOnlineStoreV2
- Bugfix: set bSuccessfullyStartedUp=false when InitNPGameSettings() fails
- Adjusted FOnlineStoreOffer to use FText::AsCurrencyBase
#RB: Paul.Moore
#TESTS: login, purchase redemption, store MTX purchasing on PS4 & PC
Change 2831129 on 2016/01/16 by David.Nikdel
#MCP
- Added a ctor to make converting from FOnlineError to FMcpQueryResult easier (for stuff that was already using FMcpQueryResult).
#RB: none
#TESTS: frontend
Change 2830986 on 2016/01/15 by Michael.Noland
PS4: Disabling FCachedReadPlatformFile on PS4 to significantly reduce high watermark memory consumption during blocking loads
#rb marcus.wassmer
#tests Ran Paragon PS4 down a bad path that currently does a blocking map and hero load
#lockdown andrew.grant
Change 2830943 on 2016/01/15 by Max.Chen
Sequencer: Fix bug introduced with preroll. It was also causing a crash in particle track instance.
#tests Master sequence trailer plays without crashing
#rb none
Change 2830912 on 2016/01/15 by Michael.Noland
Rendering: Exposed GRHIDeviceId (only filled in on D3D11 and D3D12 RHI's under the same circumstances as GRHIAdapterName, etc..., 0 otherwise)
#rb mieszko.zielinski
#tests Tested printing the value out
#codereview martin.mittring
Change 2830910 on 2016/01/15 by Michael.Noland
Rendering: Improved GPU driver detection logic to handle more cases
#codereview martin.mittring
#rb mieszko.zielinski
#tests Tested on my machine which was previous reporting Unknown for the values as some entries contained the key in the Settings subfolder
Change 2830776 on 2016/01/15 by Martin.Mittring
from Dev-Rendering
added ensure to track down multiple issues like
OR-11771 CRASH: User Crashed when pressing the Play button
OR-12430 CRASH: OT2 user crashed with FRHIResource::AddRef()
#rb:Gil.Gribb
#code_review:Gil.Gribb,Mark.Satterthwaite,Marcus.Wassmer
2016-01-20 11:32:08 -05:00
VignetteCircleSpacePos *= Intensity;
float Tan2Angle = dot( VignetteCircleSpacePos, VignetteCircleSpacePos );
2015-04-28 15:27:19 -04:00
float Cos4Angle = Square( rcp( Tan2Angle + 1 ) );
return Cos4Angle;
2014-03-14 14:13:41 -04:00
}
Copying //UE4/Orion-Staging to //UE4/Main (originated from //Orion/Dev-General @ 2831630)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2831624 on 2016/01/17 by Marcus.Wassmer
Merge disable of FCachedReadPlatformData on PS4. Reduces memory spikes. 2830986
#rb none
#test none
#codereview Michael.Noland,James.Golding
Change 2831402 on 2016/01/17 by Marcus.Wassmer
HLOD priority and streamout changes.
Give texture pool an extra 200MB which we can afford thanks to James/Michael
#rb Chris.Gagnon
#test run agora, notice nice textures.
#lockdown Andrew.Grant
Change 2831398 on 2016/01/17 by Marcus.Wassmer
Fix 3 logic bugs with Relocate
#rb chris.gagnon
#test run game, look for corruption.
#lockdown Andrew.Grant
Change 2831372 on 2016/01/16 by Marcus.Wassmer
Update param.sfo's and lockdown version in prep for good PS4 playtest build.
#rb none
#test build from last night...
#lockdown Andrew.Grant
Change 2831274 on 2016/01/16 by Graeme.Thornton
Disable platform file cache wrapper on PS4
#codereview James.Golding
#rb none
#tests ran cooked ps4 build, timed loading (no real change), measured memory used for file handles (small)
Change 2831237 on 2016/01/16 by Sammy.James
Fix PS4 compile error
#codereview Andrew.Grant
#rb none
#tests none
Change 2831219 on 2016/01/16 by Matt.Kuhlenschmidt
Fix possible invalid access to shared movie player resource across threads causing startup crash.
#codereview marcus.wassmer
#rb none, #tests initial load
Change 2831218 on 2016/01/16 by Marcus.Wassmer
Fix bad warning case.
#codereview Martin.Mittring
#rb none
#test none
Change 2831201 on 2016/01/16 by Andrew.Grant
Added extra info about referencer to missing asset reference message
#rb none
#tests cooked, ran editor
Change 2831183 on 2016/01/16 by David.Nikdel
#OSS #PS4 #Purchasing #StoreV2
- Force failure if we have no receipts after a "successful" checkout.
- Report consumed entitlements as well as unconsumed but leave ValidationInfo empty so we can tell the difference at the application level
- Convert productIds to skuIds at checkout time
- Added PS4 Implementation of IOnlineStoreV2
- Bugfix: set bSuccessfullyStartedUp=false when InitNPGameSettings() fails
- Adjusted FOnlineStoreOffer to use FText::AsCurrencyBase
#RB: Paul.Moore
#TESTS: login, purchase redemption, store MTX purchasing on PS4 & PC
Change 2831129 on 2016/01/16 by David.Nikdel
#MCP
- Added a ctor to make converting from FOnlineError to FMcpQueryResult easier (for stuff that was already using FMcpQueryResult).
#RB: none
#TESTS: frontend
Change 2830986 on 2016/01/15 by Michael.Noland
PS4: Disabling FCachedReadPlatformFile on PS4 to significantly reduce high watermark memory consumption during blocking loads
#rb marcus.wassmer
#tests Ran Paragon PS4 down a bad path that currently does a blocking map and hero load
#lockdown andrew.grant
Change 2830943 on 2016/01/15 by Max.Chen
Sequencer: Fix bug introduced with preroll. It was also causing a crash in particle track instance.
#tests Master sequence trailer plays without crashing
#rb none
Change 2830912 on 2016/01/15 by Michael.Noland
Rendering: Exposed GRHIDeviceId (only filled in on D3D11 and D3D12 RHI's under the same circumstances as GRHIAdapterName, etc..., 0 otherwise)
#rb mieszko.zielinski
#tests Tested printing the value out
#codereview martin.mittring
Change 2830910 on 2016/01/15 by Michael.Noland
Rendering: Improved GPU driver detection logic to handle more cases
#codereview martin.mittring
#rb mieszko.zielinski
#tests Tested on my machine which was previous reporting Unknown for the values as some entries contained the key in the Settings subfolder
Change 2830776 on 2016/01/15 by Martin.Mittring
from Dev-Rendering
added ensure to track down multiple issues like
OR-11771 CRASH: User Crashed when pressing the Play button
OR-12430 CRASH: OT2 user crashed with FRHIResource::AddRef()
#rb:Gil.Gribb
#code_review:Gil.Gribb,Mark.Satterthwaite,Marcus.Wassmer
2016-01-20 11:32:08 -05:00
// Scale {-1 to 1} of the viewport space to vignette circle space.
2014-03-14 14:13:41 -04:00
// Vignette space is scaled such that regardless of viewport aspect ratio,
// corners are at the same brightness on a circle.
float2 VignetteSpace(float2 Pos)
{
Copying //UE4/Orion-Staging to //UE4/Main (originated from //Orion/Dev-General @ 2831630)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2831624 on 2016/01/17 by Marcus.Wassmer
Merge disable of FCachedReadPlatformData on PS4. Reduces memory spikes. 2830986
#rb none
#test none
#codereview Michael.Noland,James.Golding
Change 2831402 on 2016/01/17 by Marcus.Wassmer
HLOD priority and streamout changes.
Give texture pool an extra 200MB which we can afford thanks to James/Michael
#rb Chris.Gagnon
#test run agora, notice nice textures.
#lockdown Andrew.Grant
Change 2831398 on 2016/01/17 by Marcus.Wassmer
Fix 3 logic bugs with Relocate
#rb chris.gagnon
#test run game, look for corruption.
#lockdown Andrew.Grant
Change 2831372 on 2016/01/16 by Marcus.Wassmer
Update param.sfo's and lockdown version in prep for good PS4 playtest build.
#rb none
#test build from last night...
#lockdown Andrew.Grant
Change 2831274 on 2016/01/16 by Graeme.Thornton
Disable platform file cache wrapper on PS4
#codereview James.Golding
#rb none
#tests ran cooked ps4 build, timed loading (no real change), measured memory used for file handles (small)
Change 2831237 on 2016/01/16 by Sammy.James
Fix PS4 compile error
#codereview Andrew.Grant
#rb none
#tests none
Change 2831219 on 2016/01/16 by Matt.Kuhlenschmidt
Fix possible invalid access to shared movie player resource across threads causing startup crash.
#codereview marcus.wassmer
#rb none, #tests initial load
Change 2831218 on 2016/01/16 by Marcus.Wassmer
Fix bad warning case.
#codereview Martin.Mittring
#rb none
#test none
Change 2831201 on 2016/01/16 by Andrew.Grant
Added extra info about referencer to missing asset reference message
#rb none
#tests cooked, ran editor
Change 2831183 on 2016/01/16 by David.Nikdel
#OSS #PS4 #Purchasing #StoreV2
- Force failure if we have no receipts after a "successful" checkout.
- Report consumed entitlements as well as unconsumed but leave ValidationInfo empty so we can tell the difference at the application level
- Convert productIds to skuIds at checkout time
- Added PS4 Implementation of IOnlineStoreV2
- Bugfix: set bSuccessfullyStartedUp=false when InitNPGameSettings() fails
- Adjusted FOnlineStoreOffer to use FText::AsCurrencyBase
#RB: Paul.Moore
#TESTS: login, purchase redemption, store MTX purchasing on PS4 & PC
Change 2831129 on 2016/01/16 by David.Nikdel
#MCP
- Added a ctor to make converting from FOnlineError to FMcpQueryResult easier (for stuff that was already using FMcpQueryResult).
#RB: none
#TESTS: frontend
Change 2830986 on 2016/01/15 by Michael.Noland
PS4: Disabling FCachedReadPlatformFile on PS4 to significantly reduce high watermark memory consumption during blocking loads
#rb marcus.wassmer
#tests Ran Paragon PS4 down a bad path that currently does a blocking map and hero load
#lockdown andrew.grant
Change 2830943 on 2016/01/15 by Max.Chen
Sequencer: Fix bug introduced with preroll. It was also causing a crash in particle track instance.
#tests Master sequence trailer plays without crashing
#rb none
Change 2830912 on 2016/01/15 by Michael.Noland
Rendering: Exposed GRHIDeviceId (only filled in on D3D11 and D3D12 RHI's under the same circumstances as GRHIAdapterName, etc..., 0 otherwise)
#rb mieszko.zielinski
#tests Tested printing the value out
#codereview martin.mittring
Change 2830910 on 2016/01/15 by Michael.Noland
Rendering: Improved GPU driver detection logic to handle more cases
#codereview martin.mittring
#rb mieszko.zielinski
#tests Tested on my machine which was previous reporting Unknown for the values as some entries contained the key in the Settings subfolder
Change 2830776 on 2016/01/15 by Martin.Mittring
from Dev-Rendering
added ensure to track down multiple issues like
OR-11771 CRASH: User Crashed when pressing the Play button
OR-12430 CRASH: OT2 user crashed with FRHIResource::AddRef()
#rb:Gil.Gribb
#code_review:Gil.Gribb,Mark.Satterthwaite,Marcus.Wassmer
2016-01-20 11:32:08 -05:00
// could be optimized but this computation should be done in the vertex shader (3 or 4 vertices)
2014-03-14 14:13:41 -04:00
float Scale = sqrt(2.0) / sqrt(1.0 + (ViewportSize.y * ViewportSize.z) * (ViewportSize.y * ViewportSize.z));
return Pos * float2(1.0, ViewportSize.y * ViewportSize.z) * Scale;
}
2014-10-13 17:13:39 -04:00
// gets 4 nearby SceneDepth values for one UV value, useful for depth downsample, uses Gather() if possible
float4 GatherSceneDepth(float2 UV, float2 InvBufferSize)
{
#if FEATURE_LEVEL >= FEATURE_LEVEL_SM5
// using Gather: xyzw in counter clockwise order starting with the sample to the lower left of the queried location
float4 DeviceZ = SceneDepthTextureNonMS.Gather(BilinearTextureSampler0, UV);
return float4(
ConvertFromDeviceZ(DeviceZ.x),
ConvertFromDeviceZ(DeviceZ.y),
ConvertFromDeviceZ(DeviceZ.z),
ConvertFromDeviceZ(DeviceZ.w)
);
#elif FEATURE_LEVEL == FEATURE_LEVEL_SM4
float2 TexelScale = 0.5f * InvBufferSize;
// @todo Optimize
// Manually sample neighbouring texels in counter clockwise order starting with the sample to the lower left of the queried location.
return float4(
CalcSceneDepth(UV + (float2(-1, 1) * TexelScale)),
CalcSceneDepth(UV + (float2( 1, 1) * TexelScale)),
CalcSceneDepth(UV + (float2( 1,-1) * TexelScale)),
CalcSceneDepth(UV + (float2(-1,-1) * TexelScale))
);
2014-10-14 10:32:08 -04:00
#else
2014-10-14 10:32:44 -04:00
return (float4)CalcSceneDepth(UV);
2014-10-13 17:13:39 -04:00
#endif // FEATURE_LEVEL
}
2015-05-12 22:28:44 -04:00
half4 UnwrappedTexture3DSample( Texture2D Texture, SamplerState Sampler, float3 UVW, float Size )
{
// a volume texture 16x16x16 would be unwrapped to a 2d texture 256x16
float IntW = floor( UVW.z * Size - 0.5 );
half FracW = UVW.z * Size - 0.5 - IntW;
float U = ( UVW.x + IntW ) / Size;
float V = UVW.y;
half4 RG0 = Texture.Sample( Sampler, float2(U, V) );
half4 RG1 = Texture.Sample( Sampler, float2(U + 1.0f / Size, V) );
return lerp(RG0, RG1, FracW);
}
2014-03-14 14:13:41 -04:00
#endif // __POST_PROCESS_COMMON__