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
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