ray traced distance field shadows in VR cause render thread to go up by 10ms on 4.15
I have encountered this issue in two separate projects and it is causing a lot of headache. I am having a hard time pinning down the cause so I cannot give an amazing guide to reproduce this. I have attached a project with a scene that demonstrates this however.
The Issue is that that the render thread will jump up to 14-20ms on a relatively simple scene when using ray traced distance field shadows on 4.15.
Toggling ray traced distance field shadows on and off will also toggle the extra 14-18ms on the CPU, while the GPU maintains 6ms shadows off vs 11ms shadows on - but the frame time will be around 20ms.
The attached project should demonstrate this. Add more occluders or shadow casting light sources to exaggerate the issue.
Windows 10, gtx 980, intel x99 platform
Screens from my profiling session are attached and the
The issue only appears when playing in VR, with a VIVE in my case the the setup in this project with the bunch of lights in one spot is a little ridiculous but I to reproduce it somehow. I have another real world project where the same thing happens with just one directional light and one sky light in a scene with like 50 static meshes and 20 rather simple skeletal meshes.
Can you post a 'stat dumpframe'? That will show a hierarchical timing view of the rendering thread.
Ray Traced Distance Field shadows aren't supposed to cost much on the Rendering Thread (the whole algorithm is on the GPU), but they do lock a vertex buffer to upload some data. There was an issue in the past where locking a vertex buffer was slow, as it would require flushing all pending RHI commands. That has been fixed, although I don't remember when.
As an aside, we unfortunately haven't really tested distance field features in VR, since our VR projects stick to almost completely static lighting for performance.
answered Apr 05 '17 at 04:16 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here