Commit Graph

477 Commits

Author SHA1 Message Date
benjamin rouveyrol
c3ddf156d3 Fix for HDR toggling on some platforms.
This does not truly change HDR since these platforms do not support toggling this at runtime. Instead we change the swapchain to be in SDR, and we end up in SDR mode with HDR output mode.

SDR in HDR mode is slightly darker on the TV, more than when comparing the screenshots of the swapchain. This is most likely due to the TV response, which needs to be investigated later on to see if we can somehow match the 2 properly.

In addition to the 2 CLs from main, this CL allows BP to change the CVar r.HDR.EnableHDROutput . On these platforms, the CVar is set with ECVF_SetByCode as soon as HDR was supported and calling EnableHDRDisplayOutput with ECVF_SetByGameSetting would get ignored

#jira UE-148923
#preflight 628fbfbd4f63120d8ee7af3d

Original CLs:
19334984
fix for r.setres on d3d12: the backbuffers were still referenced by the present queue, preventing their proper destruction

19609874
support for HDR change on process resume

#ROBOMERGE-OWNER: benjamin.rouveyrol
#ROBOMERGE-AUTHOR: benjamin.rouveyrol
#ROBOMERGE-SOURCE: CL 20439865 in //UE5/Release-5.0/... via CL 20440669
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20449414 by benjamin rouveyrol in ue5-main branch]
2022-06-01 04:20:37 -04:00
benjamin rouveyrol
7a21ea463f hdr multi window/display support
This improves how the editor deals with displays that have different capabilities (some with HDR, others without).
Centralize where the CVars are accessed
Have the swapchain created in SDR when shown on a SDR display
Make sure color gamut matches the one supported by the platform/swapchain.
Allow Movie scene capture to override the gamut/output format to keep existing behaviour (MovieSceneCapture relies on swapchain data)

#preflight 628baef5183c1e13462a504d
#jira UE-150952
#rb luke.thatcher

[CL 20347067 by benjamin rouveyrol in ue5-main branch]
2022-05-24 09:04:39 -04:00
zach bethel
c176b233da Renamed CopyTextureWithTransitions to TransitionAndCopyTexture.
#preflight 6287ddfe8828ea88c8701eea

[CL 20303093 by zach bethel in ue5-main branch]
2022-05-20 17:14:41 -04:00
Jeff Fisher
ef53d2904d FPostProcessRectParams SourceTexture support for 2DArray.
-FPostProcessRectParams was still using the old FTexture2DRHIRef/GetTexture2D pattern rather than using FTextureRHIRef directly.  This meant that it did not support 2DArray textures, like the VR swapchain, and caused an assert during a post-process blur on Lyra.
#review-20297934
#rb Arciel.Reckman
#preflight 6287e5ff9b764703c31a4077

[CL 20300846 by Jeff Fisher in ue5-main branch]
2022-05-20 15:11:49 -04:00
benjamin rouveyrol
c784ff8e7f fix for editor when r.HDR.EnableHDROutput would be true, but GRHISupportsHDROutput is false (typically happens if no HDR monitor connected).
#preflight 627bb0f60a5817c9d9460f8c
#rb patrick.boutot
#jira none

[CL 20138269 by benjamin rouveyrol in ue5-main branch]
2022-05-11 09:19:22 -04:00
christopher waters
4b9e68073c Deprecating RHICreateTexture2D and RHICreateTextureExternal2D.
#jira none
#rb zach.bethel
#preflight 627a6ec010766ef8c1f54f1e

[CL 20129702 by christopher waters in ue5-main branch]
2022-05-10 17:13:37 -04:00
zach bethel
2156756315 Replaced use of CopyToResolveTarget with CopyTexture.
#preflight 627a90ff7e5f24d1edd73422
#rb luke.thatcher, jason.hoerner

[CL 20127337 by zach bethel in ue5-main branch]
2022-05-10 14:47:34 -04:00
Patrick Boutot
02661d9bc4 Slate: Transform ResourceManager & SlateRenderer from Vector2D to Vector2f.
#jira UE-137340
#rb vincent.gauthier
#preflight 627a4b80fc07e0a9b4ee414c

[CL 20125423 by Patrick Boutot in ue5-main branch]
2022-05-10 13:26:06 -04:00
zach bethel
a574adf6d5 Deprecated RHICreateTargetableShaderResource utility method, since it's not actually used to create multisampled resources. Removed instances where it appeared multiple textures were being created, but only one was actually created. Cleaned up FTextureRenderTargetResource derived classes to use TextureRHI and TextureRenderTargetRHI.
#preflight 62798ef94561731dbe14105b
#rb christopher.waters

[CL 20113900 by zach bethel in ue5-main branch]
2022-05-09 19:27:51 -04:00
zach bethel
3cc302c633 Replace TransitionPassRenderTargets with manual transitions.
#preflight 62707135cb7b2a0613598af5

[CL 20026195 by zach bethel in ue5-main branch]
2022-05-03 11:20:40 -04:00
benjamin rouveyrol
428fb1cfce bugfixes for HDR in editor:
conversion to scRGB was happening twice in CompositeUIPixelShader: once during the LUT, and once during ST2084ToScRGB. We now rely only on the LUT to put us to the correct color space, just like we do during tonemapping
Make sure to use rec709 instead of rec2020 in editor, since this is the color space that is used by scRGB (PF_FloatRGBA backbuffer format)
Fixed UI composition to properly composite HDR elements (like the viewport) with the rest of the UI: we draw a black, 0-alpha rectangle as a proxy in the SDR pass for HDR elements, and we draw the HDR elements in their own rendertargets

#preflight 6266e5285037f70ba0f3939b
#jira UE-148996
#rb eric.renaudhoude Rod.Bogart vincent.gauthier

[CL 19918995 by benjamin rouveyrol in ue5-main branch]
2022-04-26 09:16:41 -04:00
john huelin
38e9e9a4fa Fix Interface Flickering due to uninitialized variable during the ColorBlind pass. Because of that alphablend was enabled.
[REVIEW] [at]mickael.gilabert, [at]jian.ru
[FYI] Matt.Kuhlenschmidt
#rnx

#ROBOMERGE-AUTHOR: john.huelin
#ROBOMERGE-SOURCE: CL 19758874 via CL 19758953 via CL 19759016 via CL 19759060 via CL 19759084
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v939-19570697)

[CL 19802066 by john huelin in ue5-main branch]
2022-04-18 23:30:00 -04:00
benjamin rouveyrol
30ea8aca4f Have r.HDR.Display.OutputDevice enum values defined in a single place and replaced hardcoded numbers by enum values.
#preflight 62559eb569015afc27ac1833
#jira UE-148598
#rb eric.mcdaniel

[CL 19784660 by benjamin rouveyrol in ue5-main branch]
2022-04-18 09:20:23 -04:00
christopher waters
31658ac660 Renderer dependency cleanup focused on removing RenderGraph.h from SceneRenderTargetParameters.h
#jira none
#rb zach.bethel
#preflight 62573bf61543022eed4bc2aa

[CL 19746250 by christopher waters in ue5-main branch]
2022-04-13 17:33:48 -04:00
zach bethel
a00b40ad3b Deprecated GetRenderTargetItem() from IPooledRenderTarget.
#preflight 624ddb30090236773a1a83e0
#rb luke.thatcher

#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 19655641 via CL 19655653 via CL 19655661
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19657582 by zach bethel in ue5-main branch]
2022-04-06 18:24:24 -04:00
benjamin rouveyrol
b961b65542 support for HDR change on process resume
#jira UE-124850
#preflight 624b08bf292f228e094a156d
#rb eric.mcdaniel

[CL 19609874 by benjamin rouveyrol in ue5-main branch]
2022-04-04 11:37:08 -04:00
christopher waters
18cb677334 Converting uses of RHICreateTargetableShaderResource2D to use RHICreateTargetableShaderResource.
#jira none
#rb zach.bethel
#preflight 624341dcc667881bf4dba704

[CL 19548181 by christopher waters in ue5-main branch]
2022-03-29 16:03:46 -04:00
christopher waters
35d21d13ae Converting RHICreateTargetableShaderResourceXXX to use the new API.
RHICreateTargetableShaderResource2D changes will come in a later CL.

#jira none
#rb luke.thatcher
#preflight 6242188fc61d8a458f1ea406

[CL 19533075 by christopher waters in ue5-main branch]
2022-03-28 16:47:16 -04:00
andrew ladenberger
00d77a49ee Removed a few high-frequency/low-value Slate RT stats to improve profiler readability and stability
#rb matt.kuhlenschmidt

#ROBOMERGE-AUTHOR: andrew.ladenberger
#ROBOMERGE-SOURCE: CL 19375756 via CL 19375763 via CL 19377309 via CL 19392399 via CL 19392529
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19402293 by andrew ladenberger in ue5-main branch]
2022-03-16 03:04:01 -04:00
patrick boutot
835727130a Slate: Clear the uncached draw elements and the batches elements once they are rendered. We do this to remove hard references to the Glyph Sequence from the previous frame. Cached draw elements are still cached. An old Glyph Sequence may still be a reference in a cached element but it is the responsibility of the SWidget to do the proper invalidation. Deprecated the FSlateRenderer::GetDrawBuffer to remind the user to call FSlateRenderer::ReleaseDrawBuffer.
#rb matt.kuhlenschmidt, none
#preflight 62066e4554003c49ad37c3e6
#preflight 6214eeab797dbbeb471d43cc
#preflight 621522ff9e113332ba17dc9d
#preflight 62162720104496cff889752a

#ROBOMERGE-OWNER: patrick.boutot
#ROBOMERGE-AUTHOR: patrick.boutot
#ROBOMERGE-SOURCE: CL 19089835 via CL 19089855 via CL 19092359 via CL 19093299 via CL 19101760
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19141573 by patrick boutot in ue5-main branch]
2022-02-24 23:56:41 -05:00
vincent gauthier
80a9849b3c [Backout] - CL18952424
This is causing an ensure to hit in Slate applications.

[FYI] Patrick.Boutot, Matt.Kuhlenschmidt
Original CL Desc
-----------------------------------------------------------------
Slate: Clear the uncached draw elements once they are batches and clear the batches elements once they are rendered. We do this to remove hard references to the Glyph Sequence from the previous frame. Cached draw elements are still cached. An old Glyph Sequence may still be a reference in a cached element but it is the responsibility of the SWidget to do the proper invalidation.
#rb matt.kuhlenschmidt
#preflight 62066e4554003c49ad37c3e6

#ROBOMERGE-AUTHOR: vincent.gauthier
#ROBOMERGE-SOURCE: CL 18997554 via CL 18997606 via CL 18998070 via CL 18998217 via CL 18998286 via CL 19002213 via CL 19004425
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 19004631 by vincent gauthier in ue5-main branch]
2022-02-15 17:06:47 -05:00
patrick boutot
bd0c001889 Slate: Clear the uncached draw elements once they are batches and clear the batches elements once they are rendered. We do this to remove hard references to the Glyph Sequence from the previous frame. Cached draw elements are still cached. An old Glyph Sequence may still be a reference in a cached element but it is the responsibility of the SWidget to do the proper invalidation.
#rb matt.kuhlenschmidt
#preflight 62066e4554003c49ad37c3e6

#ROBOMERGE-AUTHOR: patrick.boutot
#ROBOMERGE-SOURCE: CL 18952424 via CL 18952442 via CL 18953137 via CL 18953283 via CL 18955233 via CL 18956023
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18958325 by patrick boutot in ue5-main branch]
2022-02-11 14:42:51 -05:00
fred kimberley
7fbfaf57c8 Require explicit constructors/casts when converting between FVector, FVector3d, and FVector3f.
#jira UE-122078
#rb Andrew.Davidson, Colin.McGinley
#preflight standard build

#ROBOMERGE-AUTHOR: fred.kimberley
#ROBOMERGE-SOURCE: CL 18817999 in //UE5/Release-5.0/... via CL 18818012 via CL 18822871
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18824721 by fred kimberley in ue5-main branch]
2022-02-02 07:59:31 -05:00
andrew davidson
8e95b10069 Fix FVector2D variant casts - Runtime
Submitted on behalf of fred.kimberley
#rb andy.davidson
#preflight 61f8729a5a026d2d19bb9ca6
#preflight 61f87a025a026d2d19be76ed

#ROBOMERGE-OWNER: andrew.davidson
#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18802361 in //UE5/Release-5.0/... via CL 18802891 via CL 18821557
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18821641 by andrew davidson in ue5-main branch]
2022-02-02 01:47:07 -05:00
andrew davidson
3542cab338 FMatrix explicit cast fixes - Renderer
#rb ben.ingram, zak.middleton
#preflight 61f285e71e5d78c38307cda4

#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18752245 in //UE5/Release-5.0/... via CL 18752267 via CL 18752335
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18752338 by andrew davidson in ue5-main branch]
2022-01-27 07:20:20 -05:00