- Legacy shading model node can now be used as a regular node.
- We can have multiple legacy shading model node in a isngle material now.
- There is now a ShadinModel drop down on the node that is used when the ShadingModel input is not plugged in
- Material instance shading model override is now accounted for by the legacy shading model node. Overriden from the HLSLTranslator when detected.
The data flow now for legacy mateiral conversion is as such:
--- Conversion time - UMaterial::ConvertMaterialToStrataMaterial()
Shading model => legacy node setup (shading model from expression: relink input, otherwise: set shading model on the conversion node)
--- GatherStrataMaterialInfo
Send back what is the shadingmodel used (or if it is "from expression")
--- UMaterial::RebuildShadingModelField()
Set material Domain, ShadingModel and ShadingModels according ot the returned value (FromExpression, etc.) from GatherStrataMaterialInfo.
Those values are not authorable but do enable shading models via defines from the HLSLTranslator. Seeing them being correct also helps to understand and debug.
--- Material instance shading model override
Overriden from the HLSLTranslator when detected.
#rb charles.derousiers
[CL 27504675 by sebastien hillaire in ue5-main branch]
Fixed NANITE_SANITY_CHECK_STREAMING_REQUESTS path so it compiles again and reduced size of Magic to make room for wider page indices.
Changed independent coding of PageIndex and ClusterIndex in FVisibleCluster to a smaller combined encoding.
Added more descriptive error messages when running out of pool space.
#rb graham.wihlidal
[FYI] brian.karis, jamie.hayes
[CL 27504613 by rune stubbe in ue5-main branch]
* Only ever process instances that pass the CPU-side culling
* Use R8_UINT format for the instance visibility mask
#rb Jeremy.Moore
[CL 27399142 by yuriy odonnell in ue5-main branch]
TSR's anti-flickering heuristic (r.TSR.ShadingRejection.Flickering=1) analyses how opaque pixels changes overtime and whenever the period of changes get lower than r.TSR.ShadingRejection.Flickering.Period, the heuristic tries to stabilise the pixel by relaxing the rejections.
The problems this creates is that any fast moving texture paning and other pixel animation made in material might looks identically flickering to TSR, because not knowing the motion of the pixels animations. TSR currently not having optical flow yet, the artists needs a way to say that the velocity buffer containing the geometric velocities used for reprojection actually exclude pixel animations.
This changes implements UMaterial::bHasPixelAnimation the artists can define on opaque geometry. It end up encoded forcing the primitive to draws velocity so that bit can be encoded in velocity buffer when VELOCITY_ENCODE_DEPTH==1 because there is no room left in stencil or gbuffer, and this has the advantage to works for both forward and deferred shading renderer.
This gets passdown to shaders through in the primitive uniform parameters so that nanite global shaders FEmitSceneDepthPS and FDepthExportCS can encode it when writing out velocity. It also allows to not need to compile additional material shader permutation of FVelocityPS for non masked opaque geometry. But this causes the limitation currently that any primitive that have at least one shader with this setting enabled will force the entire primitive's material slots to draw this bit in the velocity.
TSR in turn disables it's r.TSR.ShadingRejection.Flickering=1 heuristic on any pixel that have it sets using DecodeHasPixelAnimationFromVelocityTexture().
The flag can be visualized by artists with the VisualizeTemporalUpscaler show flag.
#rb jeremy.moore
#jira UE-187459
[CL 27385162 by guillaume abadie in ue5-main branch]
Moved the WorldDepthToPixelRadius calculation to view buffer.
SSD changes are mostly a refactor as they were already compensating for the ortho branching.
NOTE: This is missing the required change for the depth plane, so artifacts will be present with the current default Ortho camera far plane (UE_OLD_WORLD_MAX). If you reduce the far plane to 100,000 it should resolve it, 10,000 seems to be a sweet spot. This will be resolved in a future CL.
#jira UE-184615
#rb Guillaume.Abadie
[CL 27385146 by jon cain in ue5-main branch]