虚幻4 Gbuffer


//
all values that are output by the forward rendering pass struct FGBufferData { // normalized float3 WorldNormal; // 0..1 (derived from BaseColor, Metalness, Specular) float3 DiffuseColor; // 0..1 (derived from BaseColor, Metalness, Specular) float3 SpecularColor; // 0..1, white for SHADINGMODELID_SUBSURFACE_PROFILE and SHADINGMODELID_EYE (apply BaseColor after scattering is more correct and less blurry) float3 BaseColor; // 0..1 float Metallic; // 0..1 float Specular; // 0..1 float4 CustomData; // Indirect irradiance luma float IndirectIrradiance; // Static shadow factors for channels assigned by Lightmass // Lights using static shadowing will pick up the appropriate channel in their deferred pass float4 PrecomputedShadowFactors; // 0..1 float Roughness; // 0..1 ambient occlusion e.g.SSAO, wet surface mask, skylight mask, ... float GBufferAO; // 0..255 uint ShadingModelID; // 0..255 uint SelectiveOutputMask; // 0..1, 2 bits, use HasDistanceFieldRepresentation(GBuffer) or HasDynamicIndirectShadowCasterRepresentation(GBuffer) to extract float PerObjectGBufferData; // in world units float CustomDepth; // Custom depth stencil value uint CustomStencil; // in unreal units (linear), can be used to reconstruct world position, // only valid when decoding the GBuffer as the value gets reconstructed from the Z buffer float Depth; // Velocity for motion blur (only used when WRITES_VELOCITY_TO_GBUFFER is enabled) float4 Velocity; // 0..1, only needed by SHADINGMODELID_SUBSURFACE_PROFILE and SHADINGMODELID_EYE which apply BaseColor later float3 StoredBaseColor; // 0..1, only needed by SHADINGMODELID_SUBSURFACE_PROFILE and SHADINGMODELID_EYE which apply Specular later float StoredSpecular; // 0..1, only needed by SHADINGMODELID_EYE which encodes Iris Distance inside Metallic float StoredMetallic; };

位置在(UE_4.21\Engine\Shaders\Private\DeferredShadingCommon.ush)  

这个Gbuffer有点大啊

posted on 2020-09-24 15:55  c_dragon  阅读(426)  评论(0编辑  收藏  举报

导航