Announcement

Collapse
No announcement yet.

DX9 vs DX11 renderer?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    DX9 vs DX11 renderer?

    I'm currently still rendering my game on DX9. This is because I find I lose ~30% performance in DX11 over DX9.

    Generally I don't see much difference (other than then nicer handling of specular maps). I'd love to start playing around with tessellation for my ground materials, so I'm curious to know what other differences I can expect from using DX11. And do you recommend it at all?

    Thanks

    #2
    Well, I did noticed something like a 20-30fps loss when switching to dx11 as you said.
    I did noticed this:
    https://forums.unrealengine.com/lega...a-quadro-k4200

    What looks like is that the ut3 weapons are rendered in front of the lightning.(not sure how your system is build).

    In regard to displacement.There was a long exhausting topic here with me and Chosker
    https://forums.unrealengine.com/lega...h-tessellation

    Looks like no one has managed to make a shader that limits to a number the displacement amount, which goes to infinity based on mesh polycount.Why I say based on mesh polycount?
    Well, I did noticed that if I place a displacement map(lets say a brick shader) on a simple 4 sided polyplane,that one will subdivide to the necessary amount and stop as it shoud.The problem comes when you give displacement on a higher polygone mesh.The displacement just keeps on adding geometry.

    So for now I'm using POM shaders.If by some chance you discover the grail of a displacement shader that has a actual limit of tessellation, please share it with your udk brothers

    Comment


      #3
      By the way, i know that the remaster of the first gears of war with ue3 uses dx12.I dont know if the latest license ue3 build has that build in or was it a studio inside job.

      Comment


        #4
        The good thing is that the "shadow acne" are very inferior, but the bad thing is the performance loss. In my last tests, performance with static meshes are basically the same, but with skeletals there are about a 30% less of performance, as you said.
        Provisional blog: http://cobaltudk.blogspot.com.es/
        Videos: https://www.youtube.com/user/cobaltudk
        Facebook: https://www.facebook.com/babylonprojectgame/

        Comment


          #5
          I think I'll give the DX11 renderer another spin soon
          I'll surely avoid tessellation on characters (anything tessellated that cuts against the nearplane results in the near-tessellation issue and I have a first person view), and I'll have to make a test where my shaders don't use the CustomLighting model (since that makes it be processed in the forward renderer so you lose the performance advantage of deferred)

          I'm still doubtful on the viability of including DX11 in a production game with UDK. I remember there being different issues and I don't know how many were resolved in the end. if your game allows switching between DX9 and DX11 I guess you should be fine (as long as you don't have the nearplane over-tessellation issue, which I'm sure caused a major overheating in my GPU that crippled it forever)

          O_and_N the last UE3 full-licensee cangelist didn't have any DX12 support. if they indeed added it it was surely an inside job

          CobaltUDK as for shadow acne I have a possible solution regardless of the renderer - it involves distorting the vertex shader in the shadow pass (so you have to add it to every material in your game). it alleviated shadow acne significantly in my game, however I only had pointlights. also it has a small performance cost. let me know if you're interested
          Follow me on Twitter!
          Developer of Elium - Prison Escape

          Comment


            #6
            I was thinking right now.We know that dx11 has some strange fps impact.Have anyone tried to see if the impact remains if we use dx11 in a x64bit cooked game?
            I plan on giving it a spin tomorow.

            Comment


              #7
              2c: I've a UDK prototype, that's a half-hemisphere planet with combat set around the corona and planet surface below. I'd hoped it could benefit from DX11 and get graphics a little closer to UE4. Net result... Unexplained noise / white speckles on all landscapes. Same goes for the Epic Citadel demo. Never found out why... So went back to DX9. Overall though, didn't really see a huge magical improvement versus the FPS hit for my use case sadly...
              Last edited by franktech; 09-16-2018, 10:19 PM.

              Comment


                #8
                Originally posted by franktech View Post
                2c: I've a UDK prototype, that's a half-hemisphere planet with combat set around the corona and planet surface below. I'd hoped it could benefit from DX11 and get graphics a little closer to UE4. Net result... Unexplained noise / white speckles on all landscapes. Same goes for the Epic Citadel demo. Never found out why... So went back to DX9. Overall though, didn't really see a huge magical improvement versus the FPS hit for my use case sadly...
                The DX11 renderer won't bring anything closer to UE4 by default. you have to manually use the DX11 features to see any graphical change of any kind. in short:
                • Bokeh Depth of Field - manually enable in your postprocess chain to get bokeh
                • Tessellation - use it in your materials
                • Image Based Reflections - use it in your scenes
                • Deferred Shading - used automatically, does not provide eyecandy benefits of any kind (theoretically just better performance)
                • Full Scene Anti Aliasing (MSAA) - no clue why it's featured as DX11, UE3's DX9 also has it
                • Screen Space Subsurface Scattering - use it in your materials
                using all of the above features will however still not bring you closer to UE4 in any significant way. you don't get PBR or probe-based image-based reflections or some of the other staple UE4 features like image-based lensflares
                the unexplained noise / white speckles are some of the issues I remembered that were unsolved. I suspect it might be caused by bad handling of not properly normalized normal input in the material, which if it's the case they could potentially be fixed in the material itself
                Follow me on Twitter!
                Developer of Elium - Prison Escape

                Comment


                  #9
                  Yeah, I have the white noise too, it's related to the normal maps in the landscape material.

                  Chosker, thanks for the info. I have a partial solution for the shadow acne, putting the plain superficies not aligned with the sun light, and using higher values for the shadow bias when the sun is high. And the Dx11 as option, where the problem is solved.

                  I found another problem using Dx11 time ago, the materials losses specularity. A solution is to activate the SSS option in the material properties (but not using it in the material tree). The material specularity returns, and the material also working in Dx9. Without performance loss.
                  I did only some tests, I have to use it in all the materials to see if is working with no problem.
                  Provisional blog: http://cobaltudk.blogspot.com.es/
                  Videos: https://www.youtube.com/user/cobaltudk
                  Facebook: https://www.facebook.com/babylonprojectgame/

                  Comment


                    #10
                    Cheers for the info Chosker

                    Comment


                      #11
                      CobaltUDK in case you want to try it my solution is below
                      0.0 disables it and it expects negative values. the higher negative value you go the more it will alleviate shadow acne but also the more it will parallax the shadows as the camera moves. you'll have to find the sweet spot for you
                      also you can see my Custom node allows you to do stuff only in the shadow pass so it might be useful for other things

                      Click image for larger version  Name:	UDKShadowPull.png Views:	1 Size:	147.5 KB ID:	1529586


                      sorry for hijacking the thread as this stuff isn't about DX11 - but I'll get to that eventually
                      Follow me on Twitter!
                      Developer of Elium - Prison Escape

                      Comment


                        #12
                        so I gave the DX11 renderer another try
                        on a simple scene (default sky, a few cubes, a few dynamic lights with no shadows) there's indeed a performance decrease when using DX11. in this scenario it was about 1.5ms difference on my GTX 970.
                        all of this was uncooked (I doubt there will be any difference though)
                        so a bit of profiling got me these conclusions:
                        • in DX11 about 0.1ms is spent in ClearView, which might randomly show up as up to 0.8ms if running in the editor (other times just 0.1ms). this can be alleviated by setting bEnableColorClear=False in the engine ini. make sure you have a skysphere/etc background otherwise the buffer won't clear the pixels!
                        • the BasePass is simply slower (0.1ms in DX9 vs 0.8ms in DX11 in my simple scene)
                        • DX11 is slower in buffer related stuff. it seems to take longer to process FinishRenderingSceneColor (0.1ms) as well as perform an extra ResolveSceneDepthTexture (0.1ms)
                        • RenderVelocities costs between 0.8ms and 1.0ms in DX11, while in DX9 it shows up as 0.0ms. I couldn't find a way to get rid of it so far
                        • Subsurface Scattering costs 0.1ms even if it's not being used by any material in the scene. the cost (and the feature) is removed by setting AllowSubsurfaceScattering=False in the settings ini
                        • Despite being reported as deferred, Lights seem to cost exactly the same
                        • Post processes seem to cost the same
                        the simple scene isn't much to go by though. surely a scene that renders at 300+ fps can't be descriptive of much

                        when launching my game's test map (heavy with fully dynamic lights and shadows) my 55fps / 18ms from DX9 became 42fps / 23ms in DX11
                        I had plenty of white NaN pixels caused by normalmaps and also by a postprocess material. I know by know these should be fixable.
                        typing stat fps made my GPU crash (black screen for a few seconds, then it recovered). the second time it was fine though.
                        I had the following observations:
                        • Post processes were still the same cost
                        • DX11 reported to render only 1/3 of the polygons and make only 1/3 of the drawcalls. quite a good boost in rendering efficiency!
                        • my shadow acne hack trick (previous post) doesn't seem to work in DX11
                        • DPG_World was significantly faster in DX11. the reported 15.5ms from DX9 became 11.0ms in DX11. despite DX11 having the small basepass/buffer/velocities extra cost, shadowed lights went from 11.6ms to 5.6ms which is a really good boost
                        • with lights+shadows (the biggest cost in my game) being so much faster, the bottleneck had to be somewhere else...
                        • I found stat SceneRendering reports a massive increase in "Velocity drawing", from 0.05ms in DX9 to 6.78ms in DX11. so the RenderVelocities thing came back bigger and badder. setting MotionBlurSkinning to 0 in the settings ini reduced the cost to 0.02ms
                        with the bottleneck solved DX11 actually became faster, giving me a 60fps / 16ms result in the same view as before. seems very much worth it at this point...
                        and then I moved the camera and the game froze and my GPU crashed again

                        bottom line: if it works for you why not, but if you're shipping a game with it don't forget to include the DX9 option


                        ok I also tried it on cooked real quick and had no GPU crash. maybe there's hope after all


                        TL;DR version:

                        how to make DX11 perform [ almost as fast / faster ] compared to DX9:
                        • set bEnableColorClear=False in the engine ini
                        • set MotionBlurSkinning=0 in the settings ini
                        • if you don't use SSS then set AllowSubsurfaceScattering=False in the settings ini
                        enjoy
                        Last edited by Chosker; 09-19-2018, 05:09 PM.
                        Follow me on Twitter!
                        Developer of Elium - Prison Escape

                        Comment

                        Working...
                        X