Commit Graph

104 Commits

Author SHA1 Message Date
charles derousiers
9e6da61cfc Fix complex special tile not being rendered with local light because stencil value was cleared during the stencil based shadow mask computation.
#rb none
[FYI] sebastien.hillaire

[CL 27729292 by charles derousiers in ue5-main branch]
2023-09-08 17:21:13 -04:00
jamespark-unreal
8ce75fa9e6 PR #10807: Fix shader errors for FXC that were causing DXC precompiles
#jira UE-194193
#rb Sebastien.Hillaire, Patrick.Kelly, Krzystof.Narkowicz
#fyi Kevin.Ortegren
#rnx

[CL 27595627 by jamespark-unreal in ue5-main branch]
2023-09-05 10:15:52 -04:00
marc audy
65de35fdfb Lof elements that were not renamed yet.
- MSM_Substrate
- MCT_Substrate
- FStrataMaterialInput

#rb charles.derousiers

[CL 27563163 by marc audy in ue5-main branch]
2023-09-01 15:06:19 -04:00
sebastien hillaire
09ef6f1c14 Substrate - Rename/move file(s) for shader folder only.
#rb none
[FYI] charles.derousiers

[CL 27514918 by sebastien hillaire in ue5-main branch]
2023-08-31 04:46:35 -04:00
charles derousiers
113e51d44d Invalid DeferredLightPixelShaders to ensure it is recomiple.
CL 26768387 change the permutation of that shader, but incorrectly didn't 'touched' the shader to invalidate it (changes were incorrectly reverted locally). This invalidation should ensure that the shader is correctly recompile with the new permutation arrangement.

#rb none
#jira UE-191830

[CL 26800750 by charles derousiers in ue5-main branch]
2023-08-03 03:42:11 -04:00
Sebastien Hillaire
fdcce957e2 Substrate
- glint can be enabled/disabled per platofm still.
- Glints are enabled by default now.
- Simplified the complexspecial path defines to only have one.

#rb none
#preflight none
#fyi charles.derousiers

[CL 25600737 by Sebastien Hillaire in ue5-main branch]
2023-05-24 08:20:05 -04:00
Sebastien Hillaire
9e42177357 Substrate - Added special path for more expensive features such as glints or SpecularLUT.
This path is taken in the shader only when needed using #define.


#rb charles.derousiers
#preflight https://horde.devtools.epicgames.com/job/646dc45c2c0a5da0dceb33e0

[CL 25600187 by Sebastien Hillaire in ue5-main branch]
2023-05-24 07:16:08 -04:00
Sebastien Hillaire
446e8c548a Substrate - shader compiliation optimisation using memeber function instead of inout involving too many registers to deal with.
#rb none
#preflight https://horde.devtools.epicgames.com/job/642aa74c6a37fb35e9a10d1e
#fyi laura.hermanns, charles.derousiers

[CL 24890650 by Sebastien Hillaire in ue5-main branch]
2023-04-03 06:52:28 -04:00
Jon Cain
598e504146 Initial orthogonal rendering fix for Point and Spot lights with light framework setup for future ortho rendering fixes
- Common.ush change of runtime check for IsOrthoProjection() function calls to minimise cost to 1ALU
- Add 2 new functions, ScreenVectorFromScreenRect and GetScreenPositionForProjectionMatrix which return corrected values depending on projection type
- Converted CommonViewUniformBuffer to read from the new ViewUniformBuffer TanAndInvTanHalfFOV vector. This means that the static projection matrix values used by these functions are assigned in SceneView.cpp. Ortho rendering does not use these values, so these functions only need to return 1.0f for each value for ortho, and moving this to a constant vector means we avoid unnecessary IsOrthoProjection checks in the shader code.
- Added a few helper functions for the above to SceneView.h/.cpp, including a correction for the ScreenToClip matrix which is now reused in multiple locations, including for shadow rendering, rather than being hard coded.
- Utilised these changes to correct the problems with Point and Spot lights+shadows in ortho perspective, and also corrects some minor artifacts that occur with directional light in ortho.

#jira UE-40089
#rb Jason.Hoerner, Jason.Nadro
#preflight 6408c712b0544ef0b4afc961
#fyi Guillaume.Abadie

[CL 24634679 by Jon Cain in ue5-main branch]
2023-03-14 09:59:54 -04:00
Charles deRousiers
48b3286bc0 Add IES atlas texture manager.
This persistent atlas hold IES texture in a unique texture array which is used by all systems (raster/RT/PT/Lumen), and unify IES profile rendering.

#rb chris.kulla, sebastien.hillaire, krzysztof.narkowicz
#jira UE-167618
#preflight 6356fd907261e565c436a0fb

[CL 22806455 by Charles deRousiers in ue5-main branch]
2022-10-27 04:36:31 -04:00
Charles deRousiers
3d74cc5d5f Fix deferred lighting where the light shape permutation didn't match the light type enum.
#rb none
#jira none
#preflight shader

[CL 22355564 by Charles deRousiers in ue5-main branch]
2022-10-05 11:08:02 -04:00
Charles deRousiers
75d0686b76 Move all light initialization from uniform to LightDataUniforms.ush
#rb none
#jira none
#preflight shaders
#fyi wouter.dekeersmaecker

[CL 22330728 by Charles deRousiers in ue5-main branch]
2022-10-04 10:48:12 -04:00
andrew lauritzen
f8032f4743 Optimizations to light loop for shadowed lights:
- Move translucent injection outside the loop rather as it shares state and doesn't need barriers between it. This had already been done for unshadowed lights but this implements it for shadowed lights as well.
- Implement VSM one pass projection (still default off) even when clustered shading is not enabled. Has two paths in the regular light loop:
  1) If another effect (ex. light functions) needs to interact with the screen shadow mask, a VSM composite path is inserted that does a quick copy from the one pass projection shadow mask bits
  2) If only VSM is needed for the light, the lookup is rolled directly into the deferred lighting pixel shader, eliding the screen shadow mask entirely
Especially in the second case this significantly cuts down on GPU idle time and g-buffer bandwidth, improving the performance of scenes with small local lights

#rb ola.olsson, charles.derousiers
#preflight 633b36f9ba39998ce84c34dd
#jira UE-122099

[CL 22327084 by andrew lauritzen in ue5-main branch]
2022-10-04 01:25:53 -04:00
Charles deRousiers
f9f762dec4 Enfore in shader SourceLength to be 0 for directional light.
Save 1 vgpr on prev gen console.

#rb none
#jira none
#preflight shaders
#fyi sebastien.hillaire

[CL 21740018 by Charles deRousiers in ue5-main branch]
2022-09-01 10:16:19 -04:00
Charles deRousiers
242a7ca0b3 Fix Strata data loading for simple/single material, and avoid loading & running extra logic.
#rb none
#jira none
#fyi sebastien.hillaire
#preflight shaders

[CL 20187438 by Charles deRousiers in ue5-main branch]
2022-05-13 15:37:53 -04:00
Sebastien Hillaire
d28a031400 Strata - beginning of rough refraction of sub layers (with scene lighting split into untouched, sss and rough reffracted luminance)
- separate SSS, opaque rough refraction and scene color output when strata project setting is enabled.
- simple placeholder per pixel variance from roughness/layers computation
- SSS only reads from subsurface buffer when ORR is enabled
- Added simple combine pass to final scene lighting (no blur for now)
- Started adding tiling but reached UAV count limit. I will refactor code later to workaround that.
- Updated light rendering, reflection environment pixel shader. Next will be lumen and clustered deferred shading.

#preflight https://horde.devtools.epicgames.com/job/622fc09fe348fe2ada4214f8
#rb none
#fyi charles.derousiers, tiantian.xie

[CL 19382940 by Sebastien Hillaire in ue5-main branch]
2022-03-15 03:11:08 -04:00
Sebastien Hillaire
effdc63651 Fixed bad SSS (overblure, missing specular) when there are IES profile, cloud shadow or a sunset with per pixel transmittance.
#rb Tiantian.Xie
#preflight none

[CL 19321461 by Sebastien Hillaire in ue5-main branch]
2022-03-09 11:41:00 -05:00
Charles deRousiers
f0a55fdc1f Move #if STRATA_ENABLED within the strata shader files to simplify strata includes.
#rb none
#jira none
#preflight shader
#fyi sebastien.hillaire

[CL 19110961 by Charles deRousiers in ue5-main branch]
2022-02-24 03:40:43 -05:00
Charles deRousiers
60296a89b6 Add Strata support for irradiance / irradiance occlusion data
#rb none
#jira none
#fyi sebastien.hillaire
#preflight shader

[CL 19037872 by Charles deRousiers in ue5-main branch]
2022-02-17 13:32:15 -05:00
Charles deRousiers
8e6616ec01 Clean up strata tile binding.
#rb none
#jira none
#fyi sebastien.hillaire
#preflight 6204d71a8e53010a1891f7f5

[CL 18933299 by Charles deRousiers in ue5-main branch]
2022-02-10 04:16:37 -05:00
Charles deRousiers
8087517639 Add cluster shading support for Strata.
#rb none
#jira none
#fyi sebastien.hillaire
#preflight 620411ce8e53010a186f002f

[CL 18922569 by Charles deRousiers in ue5-main branch]
2022-02-09 14:24:04 -05:00
Charles deRousiers
e303d75f84 Fix bad resolve error in DeferredLightPixelShaders.usf
#rb none
#jira none
#preflight skip

[CL 18861320 by Charles deRousiers in ue5-main branch]
2022-02-04 05:06:23 -05:00
Charles deRousiers
86ece99784 Add rect light texture atlas support.
This changes allow to bind a larger amount of rect. light texture, and allows future support for rect light in forward & cluster passes.

#jira none
#rb sebastien.hillaire
#preflight 61fcebd0b5092d45ad110db4

[CL 18861192 by Charles deRousiers in ue5-main branch]
2022-02-04 04:18:10 -05:00
sebastien hillaire
182520211b Adapted sky and cloud to be more LWC friendly
- all sky computations are now done in translated coordinate
- clouds shadow are in translated space but thetracing is still world space so it does cause issue for position>1000000000 (to be revisited).
- Adapted Volumetric Fog, Translucent light volume, real time refelction capture, Lumen, defered light and forward shaded translucent.
- some variables have been renamed to reflect the new working space.


#rb none
#preflight https://horde.devtools.epicgames.com/job/61f85f17114ec25fe0b7acdb
#jira https://jira.it.epicgames.com/browse/UE-139796

#ROBOMERGE-AUTHOR: sebastien.hillaire
#ROBOMERGE-SOURCE: CL 18806499 in //UE5/Release-5.0/... via CL 18808548 via CL 18822171
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18822479 by sebastien hillaire in ue5-main branch]
2022-02-02 02:45:13 -05:00
ben ingram
d1124c2e41 Move a bunch of lighting calculations to translated world space, fixes various problems at LWC scale
#preflight 61f1760afd5285142b43178a
#rb Daniel.Wright, tiago.costa, Andrew.Lauritzen, charles.derousiers
#jira UE-139831

#ROBOMERGE-AUTHOR: ben.ingram
#ROBOMERGE-SOURCE: CL 18738670 in //UE5/Release-5.0/... via CL 18738820 via CL 18739464
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18740039 by ben ingram in ue5-main branch]
2022-01-26 13:56:31 -05:00