Commit Graph

68 Commits

Author SHA1 Message Date
ben ingram
0bb0a923a0 Merging Dev-LWCRendering into Main, this includes initial work to support rendering with LWC-scale position
Basic approach is to add HLSL types FLWCScalar, FLWCMatrix, FLWCVector, etc.  Inside shaders, absolute world space position values should be represented as FLWCVector3.  Matrices that transform *into* absolute world space become FLWCMatrix.  Matrices that transform *from* world space become FLWCInverseMatrix.  Generally LWC values work by extending the regular 'float' value with an additional tile coordinate.  Final tile size will be a trade-off between scale/accuracy; I'm using 256k for now, but may need to be adjusted.  Value represented by a FLWCVector thus becomes V.Tile * TileSize + V.Offset.  Most operations can be performed directly on LWC values.  There are HLSL functions like LWCAdd, LWCSub, LWCMultiply, LWCDivide (operator overloading would be really nice here).  The goal is to stay with LWC values for as long as needed, then convert to regular float values when possible.  One thing that comes up a lot is working in translated (rather than absolute) world space.  WorldSpace + View.PrevPreViewTranslation = TranslatedWorldspace.  Except 'View.PrevPreViewTranslation' is now a FLWCVector3, and WorldSpace quantities should be as well.  So that becomes LWCAdd(WorldSpace, View.PrevPreViewTranslation) = TranslatedWorldspace.  Assuming that we're talking about a position that's "reasonably close" to the camera, it should be safe to convert the translated WS value to float.  The 'tile' coordinate of the 2 LWC values should cancel out when added together in this case.  I've done some work throughout the shader code to do this.  Materials are fully supporting LWC-values as well.  Projective texturing and vertex animation materials that I've tested work correctly even when positioned "far away" from the origin.

Lots of work remains to fully convert all of our shader code.  There's a function LWCHackToFloat(), which is a simple wrapper for LWCToFloat().  The idea of HackToFloat is to mark places that need further attention, where I'm simply converting absolute WS positions to float, to get shaders to compile.  Shaders converted in this way should continue to work for all existing content (without LWC-scale values), but they will break if positions get too large.

General overview of changed files:
LargeWorldCoordinates.ush - This defines the FLWC types and operations
GPUScene.cpp, SceneData.ush - Primitives add an extra 'float3' tile coordinate.  Instance data is unchanged, so instances need to stay within single-precision range of the primitive origin.  Could potentially split instances behind the scenes (I think) if we don't want this limitation
HLSLMaterialDerivativeAutogen.cpp, HLSLMaterialTranslator.cpp, Preshader.cpp - Translated materials to use LWC values
SceneView.cpp, SceneRelativeViewMatrices.cpp, ShaderCompiler.cpp, InstancedStereo.ush - View uniform buffer includes LWC values where appropriate
#jira UE-117101
#rb arne.schober, Michael.Galetzka

#ROBOMERGE-AUTHOR: ben.ingram
#ROBOMERGE-SOURCE: CL 17787435 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v881-17767770)

[CL 17787478 by ben ingram in ue5-release-engine-test branch]
2021-10-12 13:31:00 -04:00
aurel cordonnier
02c0f425e8 Copy up from Release-Engine-Staging @ 16738359
This represents UE4/Main @ 16738161 and Dev-PerfTest @ 16737719

[CL 16738582 by aurel cordonnier in ue5-release-engine-test branch]
2021-06-22 00:27:54 -04:00
ben ingram
96be34fb82 Allow 'Output Translucent Velocity' to be overriden by material instances
#jira FROST-2607
#rb arciel.rekman, jason.nadro

#ROBOMERGE-SOURCE: CL 16316954 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v804-16311228)

[CL 16316976 by ben ingram in ue5-release-engine-test branch]
2021-05-13 15:29:02 -04:00
Lauren Barnes
10ed5c3cf6 Adding Copy/Paste functionality to the group header in the material instance editor
#jira udn
#rb Francis.Hurteau

[CL 15647470 by Lauren Barnes in ue5-main branch]
2021-03-08 18:54:18 -04:00
lauren barnes
73f5d201b3 Material Editor Cleanup Pass
#rb Matt.Kuhlenschmidt
#jira UE-104842

#ROBOMERGE-SOURCE: CL 15421050 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15421081 by lauren barnes in ue5-main branch]
2021-02-16 15:32:34 -04:00
sebastian nordgren
f77ed4158d Material editor widgets now use the non-PropertyHandle overload of ResetToDefaultOverride. This version does not defer the action to the next frame, which was causing the property handle to be invalid.
[at]lauren.barnes

#ROBOMERGE-SOURCE: CL 15406937 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15406941 by sebastian nordgren in ue5-main branch]
2021-02-15 11:15:21 -04:00
Zousar Shaker
77d13185b7 Copying //UE5/Dev-Cooker@14539516 to Main (//UE5/Main)
[CL 14539954 by Zousar Shaker in ue5-main branch]
2020-10-21 17:56:05 -04:00
sebastian nordgren
04bae252dd Material lists now correctly display the reset to default button on the right.
SObjectPropertyEntryBox no longer has a CustomResetToDefault argument that was being ignored. Instead, all uses of it now directly use the FDetailWidgetRow OverrideResetToDefault().

#rb lauren.barnes

[CL 14444450 by sebastian nordgren in ue5-main branch]
2020-10-08 03:21:36 -04:00
ryan durand
627baf970a Updating copyright for Engine Editor.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869241 via CL 10869527 via CL 10869904
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870586 by ryan durand in Main branch]
2019-12-26 15:33:43 -05:00
Chris Gagnon
8ab0638182 Copying //UE4/Dev-Editor to Dev-Main (//UE4/Dev-Main) for 4.24
#rb none

[CL 9325047 by Chris Gagnon in Main branch]
2019-10-01 20:41:42 -04:00
lauren barnes
25e71b3717 Curve atlas parameters now filter out curves that aren't in the current atlas.
#jira UE-73129
#rb none
#rnx


#ROBOMERGE-SOURCE: CL 8639261 via CL 8651346
#ROBOMERGE-BOT: (v412-8640799)

[CL 8651500 by lauren barnes in Main branch]
2019-09-12 02:26:38 -04:00
Chris Gagnon
2e87118a18 Copying //UE4/Dev-Editor to Dev-Main (//UE4/Dev-Main) Interim 4.24.
#rb none

[CL 8614014 by Chris Gagnon in Main branch]
2019-09-10 11:35:20 -04:00
jeremy moore
ba2c07876c Edition support for RVT parameters
#ROBOMERGE-SOURCE: CL 8562097 via CL 8563573
#ROBOMERGE-BOT: (v406-8472469)

[CL 8563703 by jeremy moore in Main branch]
2019-09-06 19:47:59 -04:00
lauren ridge
dff26797bc Fix for material instance with no parent being opened for edit
#jira UE-77671
#rb copiedCL
#rnx


#ROBOMERGE-OWNER: lauren.ridge
#ROBOMERGE-AUTHOR: lauren.ridge
#ROBOMERGE-SOURCE: CL 7476839 via CL 7492270 via CL 7544868
#ROBOMERGE-BOT: (v372-7473910)

[CL 7544873 by lauren ridge in Main branch]
2019-07-23 10:45:09 -04:00
Rolando Caloca
aa0d2303d6 Copying //UE4/Dev-Rendering to Dev-Main (//UE4/Dev-Main) @ 6944469
#rb none
#rnx

[CL 6944849 by Rolando Caloca in Main branch]
2019-06-11 18:27:07 -04:00
kevin ortegren
ea9572ce76 Now treating the subsurface profile override like the other material override poroperties in the Material Instance editor UI
#rb none
[FYI] Lauren.Ridge


#ROBOMERGE-SOURCE: CL 6629070 via CL 6632166
#ROBOMERGE-BOT: (vundefined-6620334)

[CL 6632349 by kevin ortegren in Main branch]
2019-05-24 13:21:14 -04:00
kevin ortegren
c92b1c86d9 Adds support for multiple shading models per material. Each material now has a bit field of which shading models it is using. Shading models for a material are selected through a new Shading Model material expression, which can be connected to the new Shading Model material output pin. This is opt-in by selecting "From Material Expression" in the Shading Model drop down on the material. With no changes, everything should behave like before, and the old workflow is still there. Optimized shader code should be as performant as before if not using more than one shading model.
[FYI] Chris.Bunner, Krzysztof.Narkowicz, Marcus.Wassmer, Yuriy.Odonnell, Matt.Kuhlenschmidt
#rb Krzysztof.Narkowicz

#ROBOMERGE-OWNER: kevin.ortegren
#ROBOMERGE-AUTHOR: kevin.ortegren
#ROBOMERGE-SOURCE: CL 6308573 via CL 6309266

[CL 6315508 by kevin ortegren in Main branch]
2019-05-06 06:04:18 -04:00
lauren ridge
c3ec4df956 Fixed crash in case of material instance with no parent looking for parent values
#jira UE-72205
#rb Jason.Stasik
#lockdown Cristina.Riveron

#ROBOMERGE-SOURCE: CL 5690030 in //UE4/Release-4.22/...
#ROBOMERGE-BOT: RELEASE (Release-4.22 -> Main)

[CL 5711349 by lauren ridge in Main branch]
2019-04-03 13:30:43 -04:00
lauren ridge
df20b03ef0 Adding a parameter's source function or material to its tooltip
#rb Chris.Bunner
#rnx


#ROBOMERGE-SOURCE: CL 5360370 via CL 5361077

[CL 5362013 by lauren ridge in Main branch]
2019-03-11 15:19:32 -04:00
Lauren Ridge
f17272c05e Adding a parameter's source function or material to its tooltip
#jira none
#rb Chris.Bunner

[CL 5360379 by Lauren Ridge in Dev-Editor branch]
2019-03-11 12:31:15 -04:00
Marcus Wassmer
6995e20184 Merging //UE4/Dev-Main@4848702 to Dev-Rendering (//UE4/Dev-Rendering)
#rb none
#lockdown rolando.caloca

[CL 4854488 by Marcus Wassmer in Dev-Rendering branch]
2019-01-30 20:34:55 -05:00
Lauren Ridge
37d54cef41 Adding a custom reset to default for refraction depth bias
#jira UE-68873
#rb none
#lockdown Chris.Gagnon

[CL 4783915 by Lauren Ridge in Dev-Editor branch]
2019-01-23 11:51:56 -05:00
Lauren Ridge
307d9e8877 Reset to default now handles base properties and lightmass properties correctly
#jira UE-63083
#rb Chris.Bunner

[CL 4744305 by Lauren Ridge in Dev-Editor branch]
2019-01-17 12:59:56 -05:00
Marcus Wassmer
a8d6cc952b Merging //UE4/Dev-Main@4700769 to Dev-Rendering (//UE4/Dev-Rendering)
#rb none

[CL 4729861 by Marcus Wassmer in Dev-Rendering branch]
2019-01-15 18:04:38 -05:00
Chris Gagnon
1a3bf5caf1 Merging The Engine directory from //UE4/Dev-Main to //UE4/Dev-Editor upto CL 4698813
#rb none

[CL 4720826 by Chris Gagnon in Dev-Editor branch]
2019-01-14 16:55:55 -05:00