- Home /
What does #pragma multi_compile_particles do?
I've noticed this in pragma in Unity's default shaders for particles but can't find any documentation as to what it does.
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#pragma multi_compile_particles
#include "UnityCG.cginc"
Can anyone shed some light on what this does?
Answer by Allingby · Mar 19, 2013 at 05:03 PM
multi_compile is for (As the name suggests) compiling multiple instances using a set of keywords, that you define. Looking at the compiled shader, the multi_compile_particles adds SOFTPARTICLES_ON and SOFTPARTICLES_OFF, so it's just Unity's own flavor of keywords for particles, containing that one. Additionally, you can toggle the keyword in quality settings.
2016 calling, we appreciate the answer too :)
Your answer

Follow this Question
Related Questions
conditional pragma target 0 Answers
How to force the compilation of a shader in Unity? 5 Answers
UnityObjectToClipPos is inverted? 0 Answers