zoukankan      html  css  js  c++  java
  • ue deferred renderer

    https://www.bilibili.com/video/BV11a4y1H7jC

    desktop renderer 和mobile renderer各有一个deferred renderer

    用设置就能开

    mobile deferred renderer

     4.26的 mobile renderer

    仅完成了metal和vulkan部分 (mali 连vulkan也没有完成)

    ogl部分的 onchip要在4.27才能完成

    1.editor预览无光照

     Gbuffer onchip

    mobile没有shadow

     

    cpp这层有封装

     

    vulkan

    metal

    渲染部分的功能很有限 完成度不够高 很鸡肋的一个管线

    只有一个有用的东西就是onchip的封装

    void FetchGBuffer(in float2 UV, out float4 GBufferA, out float4 GBufferB, out float4 GBufferC, out float4 GBufferD, out float SceneDepth)
    {
    #if VULKAN_PROFILE
        GBufferA = VulkanSubpassFetch1(); 
        GBufferB = VulkanSubpassFetch2(); 
        GBufferC = VulkanSubpassFetch3(); 
        GBufferD = 0;
        SceneDepth = ConvertFromDeviceZ(VulkanSubpassDepthFetch());
    #elif METAL_PROFILE
        GBufferA = SubpassFetchRGBA_1(); 
        GBufferB = SubpassFetchRGBA_2(); 
        GBufferC = SubpassFetchRGBA_3(); 
        GBufferD = 0; 
        SceneDepth = ConvertFromDeviceZ(SubpassFetchR_4());
    #else
        GBufferA = Texture2DSampleLevel(MobileSceneTextures.GBufferATexture, MobileSceneTextures.GBufferATextureSampler, UV, 0); 
        GBufferB = Texture2DSampleLevel(MobileSceneTextures.GBufferBTexture, MobileSceneTextures.GBufferBTextureSampler, UV, 0);
        GBufferC = Texture2DSampleLevel(MobileSceneTextures.GBufferCTexture, MobileSceneTextures.GBufferCTextureSampler, UV, 0);
        GBufferD = 0;
        SceneDepth = ConvertFromDeviceZ(Texture2DSampleLevel(MobileSceneTextures.SceneDepthAuxTexture, MobileSceneTextures.SceneDepthAuxTextureSampler, UV, 0).r);
    #endif
    }
  • 相关阅读:
    ThreadLocal内存泄漏真因探究(转)
    JAVA设计模式工厂模式
    java设计模式单例模式
    Java-Socket
    Java-Queue总结
    Java-Reentrantlock
    Java-Iterator遍历集合
    安装和启动docker
    C# System.Reflection.Assembly动态加载资源文件
    C#调用 kernel32.dll
  • 原文地址:https://www.cnblogs.com/minggoddess/p/14164508.html
Copyright © 2011-2022 走看看