Download

How to setup the prepass ?

How do I set up the prepass ? Or how is the prepass setup ? I’m seeing a dozen drawcalls in the prepass, sometimes it’s a large number of objects, other times it’s not. How are objects put into the prepass and is there any way to specify which objects should be rendered in prepass and which not ?

In project settings, rendering section, you can choose from several these options: No prepass. Only opaque materials rendered in pre pass. Opaque and masked material rendered in pre-pass.
Certain features such as dbuffer decals and forward shading override this setting, forcing enabled pre-pass for all masked and opaque materials. If pre-pass is not forced always enabled by these features, you can enable/disable pre-pass on per object basis by using Use as Occluder checkbox.

You are incorrect sir. We have a dozen foliage type assets and neither of them has the “Use as Occluder” checkbox in the foliage type asset but they are rendered in the prepass. I would like for example to disable objects far away, especially the higher LODs.

UPDATE
After some research I came to r.MinScreenRadiusForDepthPrepass which seems to indicate a screen percentage for adding an object into the prepass. However, it doesn’t work if you have decals on (Dbuffer on), and as we need decals I haven’t tested with them off to see how well it works.