Tengku Fathullah
Tengku Fathullah

Reputation: 1370

Does #pragma exclude_renderers increase performance?

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

Upvotes: 2

Views: 2190

Answers (1)

SurvivalMachine
SurvivalMachine

Reputation: 8356

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.

Upvotes: 2

Related Questions