Commit Graph

6 Commits

Author SHA1 Message Date
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
Marc Audy
360d078ca3 Second batch of remaining Engine copyright updates.
#rnx
#rb none

[CL 10871248 by Marc Audy in Main branch]
2019-12-27 09:26:59 -05:00
Marcus Wassmer
cbfcbbb93b Merging //UE4/Dev-Main@4662404 to Dev-Rendering (//UE4/Dev-Rendering)
#rb none
Should be just copyright updates

[CL 4680440 by Marcus Wassmer in Dev-Rendering branch]
2019-01-03 19:16:26 -05:00
Marcus Wassmer
4cc088f35c Copying //UE4/Dev-Rendering-HLR@4669539 to Dev-Rendering (//UE4/Dev-Rendering)
#rb none
#lockdown rolando.caloca

[CL 4669551 by Marcus Wassmer in Dev-Rendering branch]
2018-12-18 21:41:17 -05:00
Ben Marsh
13d012685f Merging copyright update from 4.19 branch.
#rb none
#rnx
#jira

[CL 3818977 by Ben Marsh in Staging-4.19 branch]
2018-01-02 15:30:26 -05:00
Unrealbot
ddf25c16cf Branch snapshot for CL 3555263
[CL 3555263 in Main branch]
2017-07-26 10:00:02 -04:00