By the default, Force Field processes up to 24 concurrent impacts in a Desktop and up to 6 in a Mobile version of the shader.
These are the steps to adjust number of simultaneous impacts processed:
By the default, Force Field processes up to 24 concurrent impacts in a Desktop and up to 6 in a Mobile version of the shader.
These are the steps to adjust number of simultaneous impacts processed:
Notice two following lists of fixed4 _Pos_ and fixed _Pow_ declarations both starting with 0 indexes and ending with 23. Modify both lists, so they match to a number of interpolators you previously set in the Forcefield.Cs script.
For example, if you changed the interpolators from the default to a value of 8, you should set the indexes starting from 0 and end with 7.
Don’t be surprised by a number of variables required modifying by hand. Unfortunately passing an array wasn’t possible at the moment of Force Field release. Despite the fact, we look into available options considering Unity 5.4.0+ features and will be rolling new updates including even more simultaneous impacts shortly.
Unity won’t tell you a word on the successful compilation. You can now switch to your modified shader in a drop-down list of a shield material.
Important