Does #pragma exclude_renderers increase performance?

2k views Asked by At

I think i heard somewhere in article but forgot it already. It say if i excluded renderers performance will be better for shader because it will skip the checking. is it true ?

Ex :

#pragma exclude_renderers d3d11_9x xbox360 xboxone ps3 ps4 psp2

1

There are 1 answers

4
SurvivalMachine On

The purpose of exclude_renderers is to improve shader compilation time, but it also enables you to use some language features that are not available on some platforms. From the manual:

You can indicate which renderers to compile to using #pragma only_renderers or #pragma exclude_renderers directives. This is mostly useful in cases where you are explicitly using some shader language features that you know aren’t possible on some platforms.