UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
BasePassRendering.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3/*=============================================================================
4 BasePassRendering.h: Base pass rendering definitions.
5=============================================================================*/
6
7#pragma once
8
9#include "CoreMinimal.h"
10#include "HAL/IConsoleManager.h"
11#include "RHI.h"
12#include "ShaderParameters.h"
13#include "Shader.h"
14#include "HitProxies.h"
15#include "RHIStaticStates.h"
16#include "SceneManagement.h"
17#include "Materials/Material.h"
19#include "DBufferTextures.h"
20#include "LightMapRendering.h"
21#include "VelocityRendering.h"
23#include "MeshMaterialShader.h"
24#include "ShaderBaseClasses.h"
25#include "FogRendering.h"
26#include "TranslucentLighting.h"
28#include "UnrealEngine.h"
30#include "Substrate/Substrate.h"
31#include "OIT/OITParameters.h"
35#include "BlueNoise.h"
37#include "LightFunctionAtlas.h"
38#include "RenderUtils.h"
39#include "SceneTexturesConfig.h"
41
42class FScene;
43
44template<typename TBufferStruct> class TUniformBufferRef;
45
47
48class FViewInfo;
50
55
58
69
77
81 SHADER_PARAMETER_STRUCT(FPlanarReflectionUniformParameters, PlanarReflection) // Single global planar reflection for the forward pass.
88
92 // Forward shading
97 // DBuffer decals
99 // Misc
105
112 // Material SSR
119
122 // Volumetric cloud
131 // Translucency Lighting Volume
136 // Misc
142 SHADER_PARAMETER(int, TranslucencyPass)
144
147
149 FRDGBuilder& GraphBuilder,
150 const FViewInfo& View,
151 const int32 ViewIndex,
152 bool bLumenGIEnabled,
155
157 FRDGBuilder& GraphBuilder,
158 const FViewInfo& View,
159 const int32 ViewIndex = 0,
161 const FDBufferTextures& DBufferTextures = {},
162 bool bLumenGIEnabled = false,
163 bool bForRealtimeSkyCapture = false);
164
166 FRDGBuilder& GraphBuilder,
167 const FScene* Scene,
168 const FViewInfo& View,
169 const int32 ViewIndex = 0,
173 bool bLumenGIEnabled = false,
175
178
181{
182public:
183
185 {
186 OutEnvironment.SetDefine(TEXT("FORWARD_LIGHT_DATA_STRIDE"), FMath::DivideAndRoundUp<int32>(sizeof(FForwardLightData), sizeof(FVector4f)));
188 OutEnvironment.SetDefine(TEXT("NUM_CULLED_LIGHTS_GRID_STRIDE"), NumCulledLightsGridStride);
190 OutEnvironment.SetDefine(TEXT("NUM_CULLED_GRID_PRIMITIVE_TYPES"), NumCulledGridPrimitiveTypes);
191 }
192};
193
194template<typename LightMapPolicyType>
196{
197public:
201
202 typename LightMapPolicyType::ElementDataType LightMapPolicyElementData;
203};
204
209template<typename LightMapPolicyType>
210class TBasePassVertexShaderPolicyParamType : public FMeshMaterialShader, public LightMapPolicyType::VertexParametersType
211{
212 DECLARE_INLINE_TYPE_LAYOUT_EXPLICIT_BASES(TBasePassVertexShaderPolicyParamType, NonVirtual, FMeshMaterialShader, typename LightMapPolicyType::VertexParametersType);
213protected:
214
218 {
219 LightMapPolicyType::VertexParametersType::Bind(Initializer.ParameterMap);
220 ReflectionCaptureBuffer.Bind(Initializer.ParameterMap, TEXT("ReflectionCapture"));
221 }
222
223public:
224
230
232 const FScene* Scene,
233 ERHIFeatureLevel::Type FeatureLevel,
234 const FPrimitiveSceneProxy* PrimitiveSceneProxy,
235 const FMaterialRenderProxy& MaterialRenderProxy,
236 const FMaterial& Material,
238 FMeshDrawSingleShaderBindings& ShaderBindings) const;
239
241 const FShaderMapPointerTable& PointerTable,
242 const FScene* Scene,
243 const FSceneView* ViewIfDynamicMeshCommand,
244 const FVertexFactory* VertexFactory,
246 ERHIFeatureLevel::Type FeatureLevel,
247 const FPrimitiveSceneProxy* PrimitiveSceneProxy,
248 const FMeshBatch& MeshBatch,
251 FMeshDrawSingleShaderBindings& ShaderBindings,
252 FVertexInputStreamArray& VertexStreams) const;
253
255};
256
262template<typename LightMapPolicyType>
264{
267protected:
270
271public:
273 {
274 return LightMapPolicyType::ShouldCompilePermutation(Parameters);
275 }
276
278 {
279 LightMapPolicyType::ModifyCompilationEnvironment(Parameters, OutEnvironment);
281
283 {
284 OutEnvironment.SetCompileArgument(TEXT("USING_VARIABLE_RATE_SHADING"), true);
285 }
286 }
287};
288
289template<typename LightMapPolicyType>
290class TBasePassVS : public TBasePassVertexShaderBaseType<LightMapPolicyType>
291{
294
295protected:
296
302
303public:
311
313 {
315
316 // @todo MetalMRT: Remove this hack and implement proper atmospheric-fog solution for Metal MRT...
317 OutEnvironment.SetDefine(TEXT("BASEPASS_SKYATMOSPHERE_AERIALPERSPECTIVE"), !IsMetalMRTPlatform(Parameters.Platform) ? 1 : 0);
318
319 // GBUFFER_LAYOUT is used to derive GBUFFER_HAS_VELOCITY, which influences whether VelocityPrevScreenPosition is computed by the vertex shader.
320 // SLW can force velocity to be drawn in the water base pass even if the rest of the scene outputs in the depth prepass. SLW achieves this override
321 // by using GBL_ForceVelocity, which requires setting the corresponding define on the vertex shader as well, as the calculation for VelocityPrevScreenPosition will be stripped otherwise.
322 static const auto SLWForceVelocityCVar = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.Water.SingleLayer.ForceVelocity"));
325 {
326 OutEnvironment.SetDefine(TEXT("GBUFFER_LAYOUT"), GBL_ForceVelocity);
327 }
328 }
329};
330
344
349template<typename LightMapPolicyType>
350class TBasePassComputeShaderPolicyParamType : public FMeshMaterialShader, public LightMapPolicyType::ComputeParametersType
351{
352 DECLARE_INLINE_TYPE_LAYOUT_EXPLICIT_BASES(TBasePassComputeShaderPolicyParamType, NonVirtual, FMeshMaterialShader, typename LightMapPolicyType::ComputeParametersType);
353
354public:
360
362 {
363 if (ParameterMap.ContainsParameterAllocation(FSceneTextureUniformParameters::FTypeInfo::GetStructMetadata()->GetShaderVariableName()))
364 {
365 OutError.Add(TEXT("Base pass shaders cannot read from the SceneTexturesStruct."));
366 return false;
367 }
368
369 return true;
370 }
371
375 {
376 LightMapPolicyType::ComputeParametersType::Bind(Initializer.ParameterMap);
377
378 ReflectionCaptureBuffer.Bind(Initializer.ParameterMap, TEXT("ReflectionCapture"));
379 ShadingOutputsParam.Bind(Initializer.ParameterMap, TEXT("ComputeShadingOutputs"));
380
381 ViewRectParam.Bind(Initializer.ParameterMap, TEXT("ViewRect"));
382 PassDataParam.Bind(Initializer.ParameterMap, TEXT("PassData"));
383
384 Target0.Bind(Initializer.ParameterMap, TEXT("ComputeShadingOutputs.OutTarget0"));
385 Target1.Bind(Initializer.ParameterMap, TEXT("ComputeShadingOutputs.OutTarget1"));
386 Target2.Bind(Initializer.ParameterMap, TEXT("ComputeShadingOutputs.OutTarget2"));
387 Target3.Bind(Initializer.ParameterMap, TEXT("ComputeShadingOutputs.OutTarget3"));
388 Target4.Bind(Initializer.ParameterMap, TEXT("ComputeShadingOutputs.OutTarget4"));
389 Target5.Bind(Initializer.ParameterMap, TEXT("ComputeShadingOutputs.OutTarget5"));
390 Target6.Bind(Initializer.ParameterMap, TEXT("ComputeShadingOutputs.OutTarget6"));
391 Target7.Bind(Initializer.ParameterMap, TEXT("ComputeShadingOutputs.OutTarget7"));
392
393 Targets.Bind(Initializer.ParameterMap, TEXT("ComputeShadingOutputs.OutTargets"));
394
395 // These parameters should only be used nested in the base pass uniform buffer
396 check(!Initializer.ParameterMap.ContainsParameterAllocation(FFogUniformParameters::FTypeInfo::GetStructMetadata()->GetShaderVariableName()));
397 check(!Initializer.ParameterMap.ContainsParameterAllocation(FReflectionUniformParameters::FTypeInfo::GetStructMetadata()->GetShaderVariableName()));
398 check(!Initializer.ParameterMap.ContainsParameterAllocation(FPlanarReflectionUniformParameters::FTypeInfo::GetStructMetadata()->GetShaderVariableName()));
399 }
401
402 void GetShaderBindings(
403 const FScene* Scene,
404 ERHIFeatureLevel::Type FeatureLevel,
405 const FPrimitiveSceneProxy* PrimitiveSceneProxy,
406 const FMaterialRenderProxy& MaterialRenderProxy,
407 const FMaterial& Material,
409 FMeshDrawSingleShaderBindings& ShaderBindings) const;
410
411 void SetPassParameters(
413 const FUintVector4& ViewRect,
414 const FUintVector4& PassData,
415 FRHIUniformBuffer* ShadingOutputs
416 );
417
418 uint32 GetBoundTargetMask() const;
419
420private:
434};
435
440template<typename LightMapPolicyType>
463
465template<typename LightMapPolicyType, bool bEnableSkyLight, bool bVoxel, EShaderFrequency ShaderFrequency>
466class TBasePassCS : public TBasePassComputeShaderBaseType<LightMapPolicyType>
467{
469
470 class FVisualizeDim : SHADER_PERMUTATION_BOOL("VISUALIZE");
471 using FPermutationDomain = TShaderPermutationDomain<FVisualizeDim>;
472
473public:
474 static bool ShouldCompilePermutation(const FMeshMaterialShaderPermutationParameters& Parameters)
475 {
476 // Only compile skylight version for lit materials, and if the project allows them.
477 static const auto SupportStationarySkylight = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.SupportStationarySkylight"));
478 static const auto SupportAllShaderPermutations = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.SupportAllShaderPermutations"));
479
480 const bool IsSingleLayerWater = Parameters.MaterialParameters.ShadingModels.HasShadingModel(MSM_SingleLayerWater);
481
482 const bool bTranslucent = IsTranslucentBlendMode(Parameters.MaterialParameters);
483 const bool bForceAllPermutations = SupportAllShaderPermutations && SupportAllShaderPermutations->GetValueOnAnyThread() != 0;
485
486 // Debug visualization shaders are ODSC only.
487 FPermutationDomain PermutationVector{ Parameters.PermutationId };
489 {
490 return false;
491 }
492
493 const bool bCacheShaders = !bEnableSkyLight
494 //translucent materials need to compile skylight support to support MOVABLE skylights also.
495 || bTranslucent
497 || ((bProjectSupportsStationarySkylight || IsForwardShadingEnabled(Parameters.Platform)) && Parameters.MaterialParameters.ShadingModels.IsLit());
498
499 const bool bVoxelTest = (!bVoxel || (NaniteVoxelsSupported() && Parameters.MaterialParameters.bIsUsedWithVoxels && Parameters.MaterialParameters.bIsUsedWithNanite));
500
501 return bCacheShaders
502 && (IsFeatureLevelSupported(Parameters.Platform, ERHIFeatureLevel::SM5))
503 && Parameters.VertexFactoryType->SupportsComputeShading()
504 && bVoxelTest
506 }
507
509 {
511
512 OutEnvironment.SetDefine(TEXT("COMPUTE_SHADED"), 1);
513
514 if (ShaderFrequency == SF_WorkGraphComputeNode)
515 {
516 OutEnvironment.SetDefine(TEXT("WORKGRAPH_NODE"), 1);
517 }
518
519 if (bVoxel)
520 {
521 OutEnvironment.SetDefine(TEXT("NANITE_SHADING_PASS_FORCE_VOXELS"), 1);
522 }
523 else
524 {
525 OutEnvironment.SetDefine(TEXT("NANITE_SHADING_PASS_FORCE_TRIANGLES"), 1);
526 }
527
528 const bool bTranslucent = IsTranslucentBlendMode(Parameters.MaterialParameters);
532 OutEnvironment.SetDefine(TEXT("USE_LIGHT_FUNCTION_ATLAS"), (bSingleLayerWaterUsesLightFunctionAtlas || bTranslucentUsesLightFunctionAtlas) ? TEXT("1") : TEXT("0"));
533
535 }
536
541
544};
545
550template<typename LightMapPolicyType>
551class TBasePassPixelShaderPolicyParamType : public FMeshMaterialShader, public LightMapPolicyType::PixelParametersType
552{
553 DECLARE_INLINE_TYPE_LAYOUT_EXPLICIT_BASES(TBasePassPixelShaderPolicyParamType, NonVirtual, FMeshMaterialShader, typename LightMapPolicyType::PixelParametersType);
554public:
555
566
568 {
569 if (ParameterMap.ContainsParameterAllocation(FSceneTextureUniformParameters::FTypeInfo::GetStructMetadata()->GetShaderVariableName()))
570 {
571 OutError.Add(TEXT("Base pass shaders cannot read from the SceneTexturesStruct."));
572 return false;
573 }
574
575 return true;
576 }
577
581 {
582 LightMapPolicyType::PixelParametersType::Bind(Initializer.ParameterMap);
583 ReflectionCaptureBuffer.Bind(Initializer.ParameterMap, TEXT("ReflectionCapture"));
584
585 // These parameters should only be used nested in the base pass uniform buffer
586 check(!Initializer.ParameterMap.ContainsParameterAllocation(FFogUniformParameters::FTypeInfo::GetStructMetadata()->GetShaderVariableName()));
587 check(!Initializer.ParameterMap.ContainsParameterAllocation(FReflectionUniformParameters::FTypeInfo::GetStructMetadata()->GetShaderVariableName()));
588 check(!Initializer.ParameterMap.ContainsParameterAllocation(FPlanarReflectionUniformParameters::FTypeInfo::GetStructMetadata()->GetShaderVariableName()));
589 }
591
593 const FScene* Scene,
594 ERHIFeatureLevel::Type FeatureLevel,
595 const FPrimitiveSceneProxy* PrimitiveSceneProxy,
596 const FMaterialRenderProxy& MaterialRenderProxy,
597 const FMaterial& Material,
599 FMeshDrawSingleShaderBindings& ShaderBindings) const;
600
601private:
603};
604
609template<typename LightMapPolicyType>
611{
614public:
616 {
617 return LightMapPolicyType::ShouldCompilePermutation(Parameters);
618 }
619
621 {
622 LightMapPolicyType::ModifyCompilationEnvironment(Parameters, OutEnvironment);
624 }
625
628
630};
631
633template<typename LightMapPolicyType, bool bEnableSkyLight, EGBufferLayout GBufferLayout>
634class TBasePassPS : public TBasePassPixelShaderBaseType<LightMapPolicyType>
635{
637
638 class FVisualizeDim : SHADER_PERMUTATION_BOOL("VISUALIZE");
639 class FSupportOITDim : SHADER_PERMUTATION_BOOL("PERMUTATION_SUPPORTS_OIT");
640 using FPermutationDomain = TShaderPermutationDomain<FVisualizeDim, FSupportOITDim>;
641
642public:
643 static bool ShouldCompilePermutation(const FMeshMaterialShaderPermutationParameters& Parameters)
644 {
645 // Only compile skylight version for lit materials, and if the project allows them.
646 static const auto SupportStationarySkylight = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.SupportStationarySkylight"));
647 static const auto SupportAllShaderPermutations = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.SupportAllShaderPermutations"));
648
649 const bool IsSingleLayerWater = Parameters.MaterialParameters.ShadingModels.HasShadingModel(MSM_SingleLayerWater);
650
651 const bool bTranslucent = IsTranslucentBlendMode(Parameters.MaterialParameters);
652 const bool bForceAllPermutations = SupportAllShaderPermutations && SupportAllShaderPermutations->GetValueOnAnyThread() != 0;
654
655 FPermutationDomain PermutationVector{ Parameters.PermutationId };
656
657 // Debug visualization shaders are ODSC only.
659 {
660 return false;
661 }
662
663 // Only compiled OIT permutation for translucent surface, and if OIT sorted pixel is enabled for the current project
665 {
666 if (!bTranslucent || !OIT::IsSortedPixelsEnabledForProject(Parameters.Platform))
667 {
668 return false;
669 }
670 }
671
672 const bool bCacheShaders = !bEnableSkyLight
673 //translucent materials need to compile skylight support to support MOVABLE skylights also.
674 || bTranslucent
676 || ((bProjectSupportsStationarySkylight || IsForwardShadingEnabled(Parameters.Platform)) && Parameters.MaterialParameters.ShadingModels.IsLit());
677
678 return bCacheShaders
679 && (IsFeatureLevelSupported(Parameters.Platform, ERHIFeatureLevel::SM5))
682 }
683
685 {
687
690 {
693 {
694 OutEnvironment.SetDefine(TEXT("SINGLE_LAYER_WATER_NO_DISCARD"), TEXT("1"));
695 }
696 }
697
698 const bool bTranslucent = IsTranslucentBlendMode(Parameters.MaterialParameters);
701 OutEnvironment.SetDefine(TEXT("USE_LIGHT_FUNCTION_ATLAS"), (bSingleLayerWaterUsesLightFunctionAtlas || bTranslucentUsesLightFunctionAtlas) ? TEXT("1") : TEXT("0"));
702
703 const bool bIsTranslucent = IsTranslucentBlendMode(Parameters.MaterialParameters);
705 {
706 OutEnvironment.SetDefine(TEXT("ADAPTIVE_VOLUMETRIC_SHADOW_MAP"), TEXT("1"));
707 }
708
710 }
711
716
719};
720
721//Alternative base pass PS for 128 bit canvas render targets that need to be set at shader compilation time.
732
737template <typename LightMapPolicyType>
738void AddBasePassComputeShader(bool bEnableSkyLight, bool bVoxel, bool bIsDebug, EShaderFrequency ShaderFrequency, FMaterialShaderTypes& OutShaderTypes)
739{
740 int32 PermutationId = 0;
741 if (bIsDebug)
742 {
744 typename FMyShader::FPermutationDomain PermutationVector;
746 PermutationId = PermutationVector.ToDimensionValueId();
747 }
748
749 if (ShaderFrequency == SF_Compute)
750 {
751 if (bVoxel)
752 {
753 if (bEnableSkyLight)
754 {
756 }
757 else
758 {
760 }
761 }
762 else
763 {
764 if (bEnableSkyLight)
765 {
767 }
768 else
769 {
771 }
772 }
773
774 }
775 else if (ShaderFrequency == SF_WorkGraphComputeNode)
776 {
777 if (bVoxel)
778 {
779 if (bEnableSkyLight)
780 {
782 }
783 else
784 {
786 }
787 }
788 else
789 {
790 if (bEnableSkyLight)
791 {
793 }
794 else
795 {
797 }
798 }
799
800 }
801}
802
803template <typename LightMapPolicyType>
805 const FMaterial& Material,
806 const FVertexFactoryType* VertexFactoryType,
807 LightMapPolicyType LightMapPolicy,
808 ERHIFeatureLevel::Type FeatureLevel,
809 bool bEnableSkyLight,
810 bool bVoxel,
811 bool bIsDebug,
812 EShaderFrequency ShaderFrequency,
814)
815{
816 FMaterialShaderTypes ShaderTypes;
817
818 if (ComputeShader)
819 {
820 AddBasePassComputeShader<LightMapPolicyType>(bEnableSkyLight, bVoxel, bIsDebug, ShaderFrequency, ShaderTypes);
821 }
822
823 FMaterialShaders Shaders;
824 if (!Material.TryGetShaders(ShaderTypes, VertexFactoryType, Shaders))
825 {
826 return false;
827 }
828
829 Shaders.TryGetShader(ShaderFrequency, ComputeShader);
830 return true;
831}
832
833template <>
835 const FMaterial& Material,
836 const FVertexFactoryType* VertexFactoryType,
838 ERHIFeatureLevel::Type FeatureLevel,
839 bool bEnableSkyLight,
840 bool bVoxel,
841 bool bIsDebug,
842 EShaderFrequency ShaderFrequency,
844);
845
850template <typename LightMapPolicyType, EGBufferLayout GBufferLayout>
852{
853 int32 PermutationId = 0;
854 if (bIsDebug || bIsForOITPass)
855 {
857 typename FMyShader::FPermutationDomain PermutationVector;
860 PermutationId = PermutationVector.ToDimensionValueId();
861 }
862
863 if (bEnableSkyLight)
864 {
866 }
867 else
868 {
870 }
871}
872
873template <typename LightMapPolicyType>
875 const FMaterial& Material,
876 const FVertexFactoryType* VertexFactoryType,
877 LightMapPolicyType LightMapPolicy,
878 ERHIFeatureLevel::Type FeatureLevel,
879 bool bEnableSkyLight,
880 bool bUse128bitRT,
881 bool bIsDebug,
885 bool bIsForOITPass = false
886)
887{
888 FMaterialShaderTypes ShaderTypes;
889 if (VertexShader)
890 {
892 }
893
894 if (PixelShader)
895 {
896 switch (GBufferLayout)
897 {
898 case GBL_Default:
900 break;
903 break;
904 default:
905 check(false);
906 break;
907 }
908 }
909
910 FMaterialShaders Shaders;
911 if (!Material.TryGetShaders(ShaderTypes, VertexFactoryType, Shaders))
912 {
913 return false;
914 }
915
918 return true;
919}
920
921template <>
923 const FMaterial& Material,
924 const FVertexFactoryType* VertexFactoryType,
926 ERHIFeatureLevel::Type FeatureLevel,
927 bool bEnableSkyLight,
928 bool bUse128bitRT,
929 bool bIsDebug,
933 bool bIsForOITPass
934 );
935
937{
938public:
939 enum class EFlags
940 {
941 None = 0,
942
943 // Informs the processor whether a depth-stencil target is bound when processed draw commands are issued.
944 CanUseDepthStencil = (1 << 0),
945 bRequires128bitRT = (1 << 1)
946 };
947
950 const FScene* InScene,
957
958 virtual void AddMeshBatch(const FMeshBatch& RESTRICT MeshBatch, uint64 BatchElementMask, const FPrimitiveSceneProxy* RESTRICT PrimitiveSceneProxy, int32 StaticMeshId = -1) override final;
959
961
963
965 {
966 bRequiresExplicit128bitRT = Required;
967 }
968
970 {
971 return bRequiresExplicit128bitRT;
972 }
973
976
977 template<typename PassShadersType>
980 const FPSOPrecacheVertexFactoryData& VertexFactoryData,
981 const FMaterial& RESTRICT MaterialResource,
982 const FMeshPassProcessorRenderState& RESTRICT DrawRenderState,
985 ERasterizerFillMode MeshFillMode,
986 ERasterizerCullMode MeshCullMode,
987 EPrimitiveType PrimitiveType,
991 {
993 VertexFactoryData,
994 MaterialResource,
995 DrawRenderState,
998 MeshFillMode,
999 MeshCullMode,
1000 PrimitiveType,
1003 0,
1004 true /*bRequired*/,
1007
1008 // Planar reflections and scene captures use scene color alpha to keep track of where content has been rendered, for compositing into a different scene later
1009 static TConsoleVariableData<int32>* CVar = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.PSOPrecache.PrecacheAlphaColorChannel"));
1010 if (bPrecacheAlphaColorChannel && CVar && CVar->GetValueOnAnyThread() > 0)
1011 {
1013
1014 bool bRequiresAlphaChannel = true;
1015 ETextureCreateFlags ExtraSceneColorCreateFlags = ETextureCreateFlags::None;
1018 GetSceneColorFormatAndCreateFlags(InFeatureLevel, bRequiresAlphaChannel, ExtraSceneColorCreateFlags, RenderTargetsInfo.NumSamples, false, SceneColorFormatWithAlpha, SceneColorCreateFlagsWithAlpha);
1019
1022
1024 VertexFactoryData,
1025 MaterialResource,
1026 DrawRenderState,
1029 MeshFillMode,
1030 MeshCullMode,
1031 PrimitiveType,
1034 0,
1035 true,
1038 }
1039 }
1040
1041private:
1042
1043 bool TryAddMeshBatch(const FMeshBatch& RESTRICT MeshBatch, uint64 BatchElementMask, const FPrimitiveSceneProxy* RESTRICT PrimitiveSceneProxy, int32 StaticMeshId, const FMaterialRenderProxy& MaterialRenderProxy, const FMaterial& Material);
1044 bool ShouldDraw(const FMaterial& Material);
1045
1046 template<typename LightMapPolicyType>
1047 bool Process(
1051 const FPrimitiveSceneProxy* RESTRICT PrimitiveSceneProxy,
1052 const FMaterialRenderProxy& RESTRICT MaterialRenderProxy,
1053 const FMaterial& RESTRICT MaterialResource,
1054 const bool bIsMasked,
1055 const bool bIsTranslucent,
1056 FMaterialShadingModelField ShadingModels,
1057 const LightMapPolicyType& RESTRICT LightMapPolicy,
1058 const typename LightMapPolicyType::ElementDataType& RESTRICT LightMapElementData,
1059 ERasterizerFillMode MeshFillMode,
1060 ERasterizerCullMode MeshCullMode);
1061
1062 void CollectPSOInitializersForSkyLight(
1063 const FSceneTexturesConfig& SceneTexturesConfig,
1064 const FPSOPrecacheVertexFactoryData& VertexFactoryData,
1066 const FMaterial& RESTRICT MaterialResource,
1067 const bool bRenderSkylight,
1068 const bool bDitheredLODTransition,
1069 ERasterizerFillMode MeshFillMode,
1070 ERasterizerCullMode MeshCullMode,
1071 EPrimitiveType PrimitiveType,
1073
1074 template<typename LightMapPolicyType>
1075 void CollectPSOInitializersForLMPolicy(
1076 const FSceneTexturesConfig& SceneTexturesConfig,
1077 const FPSOPrecacheVertexFactoryData& VertexFactoryData,
1079 const FMaterial& RESTRICT MaterialResource,
1080 FMaterialShadingModelField ShadingModels,
1081 const bool bRenderSkylight,
1082 const bool bDitheredLODTransition,
1083 const LightMapPolicyType& RESTRICT LightMapPolicy,
1084 ERasterizerFillMode MeshFillMode,
1085 ERasterizerCullMode MeshCullMode,
1086 EPrimitiveType PrimitiveType,
1088
1089 const bool bIsDebug;
1090 const ETranslucencyPass::Type TranslucencyPassType;
1091 const bool bTranslucentBasePass;
1092 const bool bOITBasePass;
1093 const bool bEnableReceiveDecalOutput;
1094 EDepthDrawingMode EarlyZPassMode;
1095 bool bRequiresExplicit128bitRT;
1096 float AutoBeforeDOFTranslucencyBoundary = 0.0f;
1097};
1098
1100
1101extern void SetupBasePassState(FExclusiveDepthStencil::Type BasePassDepthStencilAccess, const bool bShaderComplexity, FMeshPassProcessorRenderState& DrawRenderState);
1102extern FMeshDrawCommandSortKey CalculateTranslucentMeshStaticSortKey(const FPrimitiveSceneProxy* RESTRICT PrimitiveSceneProxy, uint16 MeshIdInPrimitive);
1103
#define check(expr)
Definition AssertionMacros.h:314
bool IsGBufferLayoutSupportedForMaterial(EGBufferLayout Layout, const FMeshMaterialShaderPermutationParameters &Parameters)
Definition BasePassRendering.cpp:1002
int32 GIndirectLightingCache
Definition IndirectLightingCache.cpp:86
void SetupBasePassState(FExclusiveDepthStencil::Type BasePassDepthStencilAccess, const bool bShaderComplexity, FMeshPassProcessorRenderState &DrawRenderState)
Definition BasePassRendering.cpp:534
bool GetBasePassShaders< FUniformLightMapPolicy >(const FMaterial &Material, const FVertexFactoryType *VertexFactoryType, FUniformLightMapPolicy LightMapPolicy, ERHIFeatureLevel::Type FeatureLevel, bool bEnableSkyLight, bool bUse128bitRT, bool bIsDebug, EGBufferLayout GBufferLayout, TShaderRef< TBasePassVertexShaderPolicyParamType< FUniformLightMapPolicy > > *VertexShader, TShaderRef< TBasePassPixelShaderPolicyParamType< FUniformLightMapPolicy > > *PixelShader, bool bIsForOITPass)
Definition BasePassRendering.cpp:651
TRDGUniformBufferRef< FOpaqueBasePassUniformParameters > CreateOpaqueBasePassUniformBuffer(FRDGBuilder &GraphBuilder, const FViewInfo &View, const int32 ViewIndex=0, const FForwardBasePassTextures &ForwardBasePassTextures={}, const FDBufferTextures &DBufferTextures={}, bool bLumenGIEnabled=false, bool bForRealtimeSkyCapture=false)
Definition BasePassRendering.cpp:873
bool GetBasePassShaders(const FMaterial &Material, const FVertexFactoryType *VertexFactoryType, LightMapPolicyType LightMapPolicy, ERHIFeatureLevel::Type FeatureLevel, bool bEnableSkyLight, bool bUse128bitRT, bool bIsDebug, EGBufferLayout GBufferLayout, TShaderRef< TBasePassVertexShaderPolicyParamType< LightMapPolicyType > > *VertexShader, TShaderRef< TBasePassPixelShaderPolicyParamType< LightMapPolicyType > > *PixelShader, bool bIsForOITPass=false)
Definition BasePassRendering.h:874
bool GetBasePassShader< FUniformLightMapPolicy >(const FMaterial &Material, const FVertexFactoryType *VertexFactoryType, FUniformLightMapPolicy LightMapPolicy, ERHIFeatureLevel::Type FeatureLevel, bool bEnableSkyLight, bool bVoxel, bool bIsDebug, EShaderFrequency ShaderFrequency, TShaderRef< TBasePassComputeShaderPolicyParamType< FUniformLightMapPolicy > > *ComputeShader)
Definition BasePassRendering.cpp:782
void AddBasePassComputeShader(bool bEnableSkyLight, bool bVoxel, bool bIsDebug, EShaderFrequency ShaderFrequency, FMaterialShaderTypes &OutShaderTypes)
Definition BasePassRendering.h:738
void ModifyBasePassCSPSCompilationEnvironment(const FMeshMaterialShaderPermutationParameters &Params, EGBufferLayout GBufferLayout, bool bEnableSkyLight, FShaderCompilerEnvironment &OutEnvironment)
Definition BasePassRendering.cpp:1026
bool GetBasePassShader(const FMaterial &Material, const FVertexFactoryType *VertexFactoryType, LightMapPolicyType LightMapPolicy, ERHIFeatureLevel::Type FeatureLevel, bool bEnableSkyLight, bool bVoxel, bool bIsDebug, EShaderFrequency ShaderFrequency, TShaderRef< TBasePassComputeShaderPolicyParamType< LightMapPolicyType > > *ComputeShader)
Definition BasePassRendering.h:804
bool IsGBufferLayoutSupportedForMaterial(EGBufferLayout Layout, const FMeshMaterialShaderPermutationParameters &Params)
Definition BasePassRendering.cpp:1002
void SetupSharedBasePassParameters(FRDGBuilder &GraphBuilder, const FViewInfo &View, const int32 ViewIndex, bool bLumenGIEnabled, FSharedBasePassUniformParameters &BasePassParameters, bool bForRealtimeSkyCapture=false)
Definition BasePassRendering.cpp:818
FMeshDrawCommandSortKey CalculateTranslucentMeshStaticSortKey(const FPrimitiveSceneProxy *RESTRICT PrimitiveSceneProxy, uint16 MeshIdInPrimitive)
Definition BasePassRendering.cpp:438
void AddBasePassPixelShader(bool bEnableSkyLight, bool bIsDebug, FMaterialShaderTypes &OutShaderTypes, bool bIsForOITPass=false)
Definition BasePassRendering.h:851
TRDGUniformBufferRef< FTranslucentBasePassUniformParameters > CreateTranslucentBasePassUniformBuffer(FRDGBuilder &GraphBuilder, const FScene *Scene, const FViewInfo &View, const int32 ViewIndex=0, const FTranslucencyLightingVolumeTextures &TranslucencyLightingVolumeTextures={}, FRDGTextureRef SceneColorCopyTexture=nullptr, const ESceneTextureSetupMode SceneTextureSetupMode=ESceneTextureSetupMode::None, bool bLumenGIEnabled=false, ETranslucencyPass::Type TranslucencyPass=ETranslucencyPass::TPT_MAX)
Definition TranslucentRendering.cpp:1178
#define FORCEINLINE_DEBUGGABLE
Definition CoreMiscDefines.h:74
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
#define RESTRICT
Definition Platform.h:706
FPlatformTypes::uint64 uint64
A 64-bit unsigned integer.
Definition Platform.h:1117
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
FStaticFeatureLevel GetMaxSupportedFeatureLevel(const FStaticShaderPlatform InShaderPlatform)
Definition DataDrivenShaderPlatformInfo.h:1023
bool IsFeatureLevelSupported(const FStaticShaderPlatform InShaderPlatform, ERHIFeatureLevel::Type InFeatureLevel)
Definition DataDrivenShaderPlatformInfo.h:1047
bool IsMetalMRTPlatform(const FStaticShaderPlatform Platform)
Definition DataDrivenShaderPlatformInfo.h:949
EDepthDrawingMode
Definition DepthRendering.h:21
constexpr bool EnumHasAllFlags(Enum Flags, Enum Contains)
Definition EnumClassFlags.h:28
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
EGBufferLayout
Definition GBufferInfo.h:107
@ GBL_Default
Definition GBufferInfo.h:108
@ GBL_ForceVelocity
Definition GBufferInfo.h:109
bool ShouldCompositeHeterogeneousVolumesWithTranslucency()
Definition HeterogeneousVolumes.cpp:359
int32 NumCulledGridPrimitiveTypes
Definition LightGridInjection.cpp:282
int32 NumCulledLightsGridStride
Definition LightGridInjection.cpp:281
ELightMapPolicyType
Definition LightMapRendering.h:302
ENGINE_API bool IsTranslucentBlendMode(EBlendMode BlendMode)
#define LAYOUT_FIELD(T, Name,...)
Definition MemoryLayout.h:471
#define DECLARE_INLINE_TYPE_LAYOUT_EXPLICIT_BASES(T, Interface,...)
Definition MemoryLayout.h:562
#define DECLARE_INLINE_TYPE_LAYOUT(T, Interface)
Definition MemoryLayout.h:558
const bool
Definition NetworkReplayStreaming.h:178
EPixelFormat
Definition PixelFormat.h:16
EShaderFrequency
Definition RHIDefinitions.h:202
@ SF_Compute
Definition RHIDefinitions.h:208
@ SF_WorkGraphComputeNode
Definition RHIDefinitions.h:214
ERasterizerCullMode
Definition RHIDefinitions.h:369
ETextureCreateFlags
Definition RHIDefinitions.h:1091
ERasterizerFillMode
Definition RHIDefinitions.h:358
EPrimitiveType
Definition RHIDefinitions.h:822
EShaderPlatform
Definition RHIShaderPlatform.h:11
#define DECLARE_GPU_STAT_NAMED_EXTERN(StatName, NameString)
Definition RealtimeGPUProfiler.h:260
#define DECLARE_GPU_DRAWCALL_STAT_EXTERN(StatName)
Definition RealtimeGPUProfiler.h:257
bool GetTranslucentUsesLightFunctionAtlas()
Definition RenderUtils.cpp:1907
bool IsForwardShadingEnabled(const FStaticShaderPlatform Platform)
Definition RenderUtils.cpp:1557
bool GetSingleLayerWaterUsesLightFunctionAtlas()
Definition RenderUtils.cpp:1902
bool HardwareVariableRateShadingSupportedByPlatform(EShaderPlatform ShaderPlatform)
Definition RenderUtils.cpp:2410
bool NaniteVoxelsSupported()
Definition RenderUtils.cpp:1361
bool DoesPlatformSupportHeterogeneousVolumes(EShaderPlatform Platform)
Definition RenderUtils.cpp:1472
bool IsSingleLayerWaterDepthPrepassEnabled(const FStaticShaderPlatform Platform, const FStaticFeatureLevel FeatureLevel)
Definition RenderUtils.cpp:1494
ESceneTextureSetupMode
Definition SceneRenderTargetParameters.h:31
void GetSceneColorFormatAndCreateFlags(ERHIFeatureLevel::Type FeatureLevel, bool bRequiresAlphaChannel, ETextureCreateFlags ExtraSceneColorCreateFlags, uint32 NumSamples, bool bMemorylessMSAA, EPixelFormat &SceneColorFormat, ETextureCreateFlags &SceneColorCreateFlags)
Definition SceneTexturesConfig.cpp:142
#define SHADER_PARAMETER_RDG_BUFFER_SRV(ShaderType, MemberName)
Definition ShaderParameterMacros.h:1800
#define SHADER_PARAMETER_RDG_TEXTURE(ShaderType, MemberName)
Definition ShaderParameterMacros.h:1752
#define SHADER_PARAMETER_TEXTURE(ShaderType, MemberName)
Definition ShaderParameterMacros.h:1708
#define END_GLOBAL_SHADER_PARAMETER_STRUCT
Definition ShaderParameterMacros.h:1669
#define SHADER_PARAMETER_SAMPLER(ShaderType, MemberName)
Definition ShaderParameterMacros.h:1740
#define BEGIN_UNIFORM_BUFFER_STRUCT(StructTypeName, DllStorage)
Definition ShaderParameterMacros.h:1512
#define SHADER_PARAMETER_RDG_TEXTURE_UAV(ShaderType, MemberName)
Definition ShaderParameterMacros.h:1788
#define BEGIN_GLOBAL_SHADER_PARAMETER_STRUCT
Definition ShaderParameterMacros.h:1663
#define SHADER_PARAMETER_STRUCT_INCLUDE(StructType, MemberName)
Definition ShaderParameterMacros.h:1895
#define END_UNIFORM_BUFFER_STRUCT()
Definition ShaderParameterMacros.h:1520
#define SHADER_PARAMETER_STRUCT(StructType, MemberName)
Definition ShaderParameterMacros.h:1847
#define SHADER_PARAMETER_RDG_TEXTURE_SRV(ShaderType, MemberName)
Definition ShaderParameterMacros.h:1764
#define SHADER_PARAMETER(MemberType, MemberName)
Definition ShaderParameterMacros.h:1684
#define SHADER_PERMUTATION_BOOL(InDefineName)
Definition ShaderPermutation.h:482
#define DECLARE_SHADER_TYPE(ShaderClass, ShaderMetaTypeShortcut,...)
Definition Shader.h:1688
EVertexInputStreamType
Definition VertexFactory.h:128
uint16_t uint16
Definition binka_ue_file_header.h:7
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition BasePassRendering.h:723
static void ModifyCompilationEnvironment(const FMeshMaterialShaderPermutationParameters &Parameters, FShaderCompilerEnvironment &OutEnvironment)
Definition BasePassRendering.cpp:192
static bool ShouldCompilePermutation(const FMeshMaterialShaderPermutationParameters &Parameters)
Definition BasePassRendering.cpp:186
Definition BasePassRendering.h:937
virtual void CollectPSOInitializers(const FSceneTexturesConfig &SceneTexturesConfig, const FMaterial &Material, const FPSOPrecacheVertexFactoryData &VertexFactoryData, const FPSOPrecacheParams &PreCacheParams, TArray< FPSOPrecacheData > &PSOInitializers) override final
Definition BasePassRendering.cpp:2514
FMeshPassProcessorRenderState PassDrawRenderState
Definition BasePassRendering.h:962
EFlags
Definition BasePassRendering.h:940
static void AddBasePassGraphicsPipelineStateInitializer(ERHIFeatureLevel::Type InFeatureLevel, const FPSOPrecacheVertexFactoryData &VertexFactoryData, const FMaterial &RESTRICT MaterialResource, const FMeshPassProcessorRenderState &RESTRICT DrawRenderState, const FGraphicsPipelineRenderTargetsInfo &RESTRICT RenderTargetsInfo, const PassShadersType &PassShaders, ERasterizerFillMode MeshFillMode, ERasterizerCullMode MeshCullMode, EPrimitiveType PrimitiveType, bool bPrecacheAlphaColorChannel, int InPSOCollectorIndex, TArray< FPSOPrecacheData > &PSOInitializers)
Definition BasePassRendering.h:978
static ELightMapPolicyType GetUniformLightMapPolicyType(ERHIFeatureLevel::Type FeatureLevelconst, const FScene *Scene, const FLightCacheInterface *LCI, const FPrimitiveSceneProxy *RESTRICT PrimitiveSceneProxy, const FMaterial &Material)
Definition BasePassRendering.cpp:2330
FORCEINLINE_DEBUGGABLE void Set128BitRequirement(const bool Required)
Definition BasePassRendering.h:964
static TArray< ELightMapPolicyType, TInlineAllocator< 2 > > GetUniformLightMapPolicyTypeForPSOCollection(ERHIFeatureLevel::Type FeatureLevel, const FMaterial &Material)
Definition BasePassRendering.cpp:2441
FORCEINLINE_DEBUGGABLE bool Get128BitRequirement() const
Definition BasePassRendering.h:969
virtual void AddMeshBatch(const FMeshBatch &RESTRICT MeshBatch, uint64 BatchElementMask, const FPrimitiveSceneProxy *RESTRICT PrimitiveSceneProxy, int32 StaticMeshId=-1) override final
Definition BasePassRendering.cpp:2058
Type
Definition RHIResources.h:412
Definition BasePassRendering.h:60
FVector4f SpotAnglesAndSourceRadiusPacked
Definition BasePassRendering.h:65
FVector4f LightDirectionAndSceneInfoExtraDataPacked
Definition BasePassRendering.h:64
FVector4f LightPositionAndInvRadius
Definition BasePassRendering.h:62
FVector4f LightTangentAndIESDataAndSpecularScale
Definition BasePassRendering.h:66
FVector4f RectDataAndVirtualShadowMapIdOrPrevLocalLightIndex
Definition BasePassRendering.h:67
FVector4f LightColorAndIdAndFalloffExponentAndRayEndBias
Definition BasePassRendering.h:63
Definition BasePassRendering.h:181
static void ModifyCompilationEnvironment(EShaderPlatform Platform, FShaderCompilerEnvironment &OutEnvironment)
Definition BasePassRendering.h:184
Definition SceneManagement.h:820
Definition MaterialRenderProxy.h:102
Definition MaterialShared.h:2058
Definition MeshPassProcessor.h:1482
Definition MeshDrawShaderBindings.h:104
Definition MeshMaterialShader.h:22
Definition MeshMaterialShader.h:68
Definition MeshPassProcessor.h:1670
Definition MeshPassProcessor.h:2199
const FScene *RESTRICT Scene
Definition MeshPassProcessor.h:2203
void AddGraphicsPipelineStateInitializer(const FPSOPrecacheVertexFactoryData &VertexFactoryData, const FMaterial &RESTRICT MaterialResource, const FMeshPassProcessorRenderState &RESTRICT DrawRenderState, const FGraphicsPipelineRenderTargetsInfo &RESTRICT RenderTargetsInfo, const PassShadersType &PassShaders, ERasterizerFillMode MeshFillMode, ERasterizerCullMode MeshCullMode, EPrimitiveType PrimitiveType, EMeshPassFeatures MeshPassFeatures, bool bRequired, TArray< FPSOPrecacheData > &PSOInitializers)
Definition MeshPassProcessor.inl:211
ERHIFeatureLevel::Type FeatureLevel
Definition MeshPassProcessor.h:2204
Definition PrimitiveSceneProxy.h:296
Definition RenderGraphBuilder.h:49
Definition RenderGraphResources.h:571
Definition RHIResources.h:1232
Definition SceneView.h:1425
Definition ScenePrivate.h:2875
Definition Shader.h:637
Definition ShaderCore.h:323
RENDERCORE_API bool ContainsParameterAllocation(FStringView ParameterName) const
Definition ShaderCore.cpp:1090
Definition ShaderParameters.h:56
Definition ShaderParameters.h:166
Definition ShaderParameters.h:109
static void ModifyCompilationEnvironment(const FShaderPermutationParameters &, FShaderCompilerEnvironment &)
Definition Shader.h:854
Definition LightMapRendering.h:346
Definition VertexFactory.h:314
Definition VertexFactory.h:661
Definition SceneRendering.h:1132
Definition BasePassRendering.h:467
static void ModifyCompilationEnvironment(const FMeshMaterialShaderPermutationParameters &Parameters, FShaderCompilerEnvironment &OutEnvironment)
Definition BasePassRendering.h:508
static bool ShouldCompilePermutation(const FMeshMaterialShaderPermutationParameters &Parameters)
Definition BasePassRendering.h:474
TBasePassCS()
Definition BasePassRendering.h:543
TBasePassCS(const ShaderMetaType::CompiledShaderInitializerType &Initializer)
Definition BasePassRendering.h:538
Definition BasePassRendering.h:442
TBasePassComputeShaderBaseType()
Definition BasePassRendering.h:461
static void ModifyCompilationEnvironment(const FMeshMaterialShaderPermutationParameters &Parameters, FShaderCompilerEnvironment &OutEnvironment)
Definition BasePassRendering.h:452
static bool ShouldCompilePermutation(const FMeshMaterialShaderPermutationParameters &Parameters)
Definition BasePassRendering.h:447
TBasePassComputeShaderBaseType(const FMeshMaterialShaderType::CompiledShaderInitializerType &Initializer)
Definition BasePassRendering.h:459
Definition BasePassRendering.h:351
static bool ValidateCompiledResult(EShaderPlatform Platform, const FShaderParameterMap &ParameterMap, TArray< FString > &OutError)
Definition BasePassRendering.h:361
TBasePassComputeShaderPolicyParamType()
Definition BasePassRendering.h:400
static void ModifyCompilationEnvironment(const FMeshMaterialShaderPermutationParameters &Parameters, FShaderCompilerEnvironment &OutEnvironment)
Definition BasePassRendering.h:355
TBasePassComputeShaderPolicyParamType(const FMeshMaterialShaderType::CompiledShaderInitializerType &Initializer)
Definition BasePassRendering.h:373
Definition BasePassRendering.h:635
TBasePassPS(const ShaderMetaType::CompiledShaderInitializerType &Initializer)
Definition BasePassRendering.h:713
static void ModifyCompilationEnvironment(const FMeshMaterialShaderPermutationParameters &Parameters, FShaderCompilerEnvironment &OutEnvironment)
Definition BasePassRendering.h:684
TBasePassPS()
Definition BasePassRendering.h:718
static bool ShouldCompilePermutation(const FMeshMaterialShaderPermutationParameters &Parameters)
Definition BasePassRendering.h:643
Definition BasePassRendering.h:611
TBasePassPixelShaderBaseType(const FMeshMaterialShaderType::CompiledShaderInitializerType &Initializer)
Definition BasePassRendering.h:627
TBasePassPixelShaderBaseType()
Definition BasePassRendering.h:629
static void ModifyCompilationEnvironment(const FMeshMaterialShaderPermutationParameters &Parameters, FShaderCompilerEnvironment &OutEnvironment)
Definition BasePassRendering.h:620
static bool ShouldCompilePermutation(const FMeshMaterialShaderPermutationParameters &Parameters)
Definition BasePassRendering.h:615
Definition BasePassRendering.h:552
static void ModifyCompilationEnvironment(const FMeshMaterialShaderPermutationParameters &Parameters, FShaderCompilerEnvironment &OutEnvironment)
Definition BasePassRendering.h:556
static bool ValidateCompiledResult(EShaderPlatform Platform, const FShaderParameterMap &ParameterMap, TArray< FString > &OutError)
Definition BasePassRendering.h:567
void GetShaderBindings(const FScene *Scene, ERHIFeatureLevel::Type FeatureLevel, const FPrimitiveSceneProxy *PrimitiveSceneProxy, const FMaterialRenderProxy &MaterialRenderProxy, const FMaterial &Material, const TBasePassShaderElementData< LightMapPolicyType > &ShaderElementData, FMeshDrawSingleShaderBindings &ShaderBindings) const
Definition BasePassRendering.inl:61
TBasePassPixelShaderPolicyParamType()
Definition BasePassRendering.h:590
TBasePassPixelShaderPolicyParamType(const FMeshMaterialShaderType::CompiledShaderInitializerType &Initializer)
Definition BasePassRendering.h:579
Definition BasePassRendering.h:196
LightMapPolicyType::ElementDataType LightMapPolicyElementData
Definition BasePassRendering.h:202
TBasePassShaderElementData(const typename LightMapPolicyType::ElementDataType &InLightMapPolicyElementData)
Definition BasePassRendering.h:198
Definition BasePassRendering.h:291
static void ModifyCompilationEnvironment(const FMeshMaterialShaderPermutationParameters &Parameters, FShaderCompilerEnvironment &OutEnvironment)
Definition BasePassRendering.h:312
static bool ShouldCompilePermutation(const FMeshMaterialShaderPermutationParameters &Parameters)
Definition BasePassRendering.h:304
TBasePassVS()
Definition BasePassRendering.h:297
TBasePassVS(const FMeshMaterialShaderType::CompiledShaderInitializerType &Initializer)
Definition BasePassRendering.h:298
Definition BasePassRendering.h:264
static bool ShouldCompilePermutation(const FMeshMaterialShaderPermutationParameters &Parameters)
Definition BasePassRendering.h:272
TBasePassVertexShaderBaseType(const FMeshMaterialShaderType::CompiledShaderInitializerType &Initializer)
Definition BasePassRendering.h:268
TBasePassVertexShaderBaseType()
Definition BasePassRendering.h:269
static void ModifyCompilationEnvironment(const FMeshMaterialShaderPermutationParameters &Parameters, FShaderCompilerEnvironment &OutEnvironment)
Definition BasePassRendering.h:277
Definition BasePassRendering.h:211
TBasePassVertexShaderPolicyParamType()
Definition BasePassRendering.h:215
void GetShaderBindings(const FScene *Scene, ERHIFeatureLevel::Type FeatureLevel, const FPrimitiveSceneProxy *PrimitiveSceneProxy, const FMaterialRenderProxy &MaterialRenderProxy, const FMaterial &Material, const TBasePassShaderElementData< LightMapPolicyType > &ShaderElementData, FMeshDrawSingleShaderBindings &ShaderBindings) const
Definition BasePassRendering.inl:24
void GetElementShaderBindings(const FShaderMapPointerTable &PointerTable, const FScene *Scene, const FSceneView *ViewIfDynamicMeshCommand, const FVertexFactory *VertexFactory, const EVertexInputStreamType InputStreamType, ERHIFeatureLevel::Type FeatureLevel, const FPrimitiveSceneProxy *PrimitiveSceneProxy, const FMeshBatch &MeshBatch, const FMeshBatchElement &BatchElement, const TBasePassShaderElementData< LightMapPolicyType > &ShaderElementData, FMeshDrawSingleShaderBindings &ShaderBindings, FVertexInputStreamArray &VertexStreams) const
Definition BasePassRendering.inl:43
static void ModifyCompilationEnvironment(const FMaterialShaderPermutationParameters &Parameters, FShaderCompilerEnvironment &OutEnvironment)
Definition BasePassRendering.h:225
LAYOUT_FIELD(FShaderUniformBufferParameter, ReflectionCaptureBuffer)
TBasePassVertexShaderPolicyParamType(const FMeshMaterialShaderType::CompiledShaderInitializerType &Initializer)
Definition BasePassRendering.h:216
Definition ConcurrentLinearAllocator.h:571
Definition IConsoleManager.h:1721
T GetValueOnAnyThread(bool bForceGameThread=false) const
Definition IConsoleManager.h:1753
Definition RenderGraphResources.h:251
Definition Shader.h:1021
Definition ShaderParameterMacros.h:136
Definition MaterialExpressionSingleLayerWaterMaterialOutput.h:13
Type
Definition MeshPassProcessor.h:38
Type
Definition RHIFeatureLevel.h:20
@ SM5
Definition RHIFeatureLevel.h:42
Type
Definition TranslucentPassResource.h:13
@ TPT_MAX
Definition TranslucentPassResource.h:22
Definition LightFunctionAtlas.cpp:122
Definition SkinnedMeshComponent.h:50
Definition BasePassRendering.h:52
bool IsSortedPixelsEnabledForProject(EShaderPlatform InPlatform)
Definition OIT.cpp:873
Definition RenderUtils.cpp:2080
@ false
Definition radaudio_common.h:23
Definition DBufferTextures.h:35
Definition BasePassRendering.h:71
FRDGTextureRef SceneDepthIfResolved
Definition BasePassRendering.h:74
bool bIs24BitUnormDepthStencil
Definition BasePassRendering.h:75
FRDGTextureRef ScreenSpaceAO
Definition BasePassRendering.h:72
FRDGTextureRef ScreenSpaceShadowMask
Definition BasePassRendering.h:73
Definition RHIResources.h:4547
uint64 bAllowVariableRateShading
Definition MaterialShared.h:1157
FMaterialShadingModelField ShadingModels
Definition MaterialShared.h:1065
Definition MaterialShader.h:45
FMaterialShaderParameters MaterialParameters
Definition MaterialShader.h:46
Definition MaterialShaderType.h:198
const FShaderType * AddShaderType(const FShaderType *InType, int32 InPermutationId=0)
Definition MaterialShaderType.h:205
Definition MaterialShaderType.h:222
bool TryGetPixelShader(TShaderRef< ShaderType > &OutShader) const
Definition MaterialShaderType.h:275
bool TryGetShader(EShaderFrequency InFrequency, TShaderRef< ShaderType > &OutShader) const
Definition MaterialShaderType.h:240
bool TryGetVertexShader(TShaderRef< ShaderType > &OutShader) const
Definition MaterialShaderType.h:274
Definition EngineTypes.h:732
bool HasShadingModel(EMaterialShadingModel InShadingModel) const
Definition EngineTypes.h:756
Definition MeshBatch.h:232
Definition MeshBatch.h:371
Definition MeshMaterialShader.h:33
Definition MeshMaterialShaderType.h:29
Definition MeshPassProcessor.h:2118
Definition BasePassRendering.h:1105
TShaderRef< TBasePassComputeShaderPolicyParamType< FUniformLightMapPolicy > > TypedShader
Definition BasePassRendering.h:1106
Definition PSOPrecache.h:226
Definition PSOPrecache.h:30
Definition PSOPrecache.h:150
Definition RHIShaderParameters.h:241
Definition SceneTexturesConfig.h:114
Definition SingleLayerWaterRendering.h:32
Definition ShaderCore.h:544
const EShaderPlatform Platform
Definition ShaderPermutation.h:29
Definition TranslucentLighting.h:16
TConsoleVariableData< int32 > * FindTConsoleVariableDataInt(const TCHAR *Name) const
Definition IConsoleManager.h:1203
static IConsoleManager & Get()
Definition IConsoleManager.h:1270
Definition ShaderPermutation.h:229