• ue渲染列表


    scenevisibility.cpp

    MarkRelevant()

    逐个primitive 加到 分属于各个pass的渲染list

    ComputeDynamicMeshRelevance()

    NumElements = MeshBatch.Mesh->Elements.Num();

    每个pass里elements数量更新

     

    MobileBasePass.cpp

    FMobileBasePassMeshProcessor::Process()

    定义回调

    meshBatch

    FMeshPassProcessor postprocess前面各个pass继承这个processor有自己的rendering

     

    MobileShadingRenderer.cpp

    SetupMobileBasePassAfterShadowInit()

    添加回调

     

    总的结构

    renderer里 排布各个pass

    pass用的数据来自meshPassProcessor  (FCustomDepthPassMeshProcessor)

    xxRendering里(或者setup)定义processor addMeshBatch,用父类meshPassProcessor.addMeshBatch 

    它们被renderer的render()调用 位于renderer这层 物理位置在rendering.cpp

     

    FPrimitiveViewRelevance

     

    FPrimitiveSceneProxy::FPrimitiveSceneProxy(const UPrimitiveComponent* InComponent, FName InResourceName)

    , bCastVolumetricTranslucentShadow(InComponent->bCastDynamicShadow && InComponent->CastShadow && InComponent->bCastVolumetricTranslucentShadow)

     

    if (MeshBatch.CastShadow)
    	{
    		// Determine the mesh's material and blend mode.
    		const FMaterialRenderProxy* FallbackMaterialRenderProxyPtr = nullptr;
    		const FMaterial& Material = MeshBatch.MaterialRenderProxy->GetMaterialWithFallback(FeatureLevel, FallbackMaterialRenderProxyPtr);
    		const FMaterialRenderProxy& MaterialRenderProxy = FallbackMaterialRenderProxyPtr ? *FallbackMaterialRenderProxyPtr : *MeshBatch.MaterialRenderProxy;
    
    		const EBlendMode BlendMode = Material.GetBlendMode();
    		const float MaterialTranslucentShadowStartOffset = Material.GetTranslucentShadowStartOffset();
    		const FMeshDrawingPolicyOverrideSettings OverrideSettings = ComputeMeshOverrideSettings(MeshBatch);
    		const ERasterizerFillMode MeshFillMode = ComputeMeshFillMode(MeshBatch, Material, OverrideSettings);
    		const ERasterizerCullMode MeshCullMode = ComputeMeshCullMode(MeshBatch, Material, OverrideSettings);
    		const bool bIsTranslucent = IsTranslucentBlendMode(BlendMode);
    

      开关数据放在material里 用这种方式拿到

      还可以放component 作用于整个mesh的数据 

     

    设置pass rt

    BeginRenderPass

  • 相关阅读:
    [PHP]AES加密----PHP服务端和Android客户端
    [PHP]memcache安装
    [Android]apk反编译方法
    [PHP]生成随机数(建立字典)
    [PHP]Mysql的运用
    [PHP]对象数组和普通数组总结
    ThinkPHP5+Redis单例型购物车
    移动硬盘新建选项消失、不能新建文件夹和文件的解决方案
    PHP substr() 函数截取中文字符串乱码
    php开发中遇到问题的找错误的方法
  • 原文地址:https://www.cnblogs.com/minggoddess/p/14251028.html
Copyright © 2020-2023  润新知