Multiple init of SKShader with identical source code

Hi,


I'm using a large number of identical shader (same source file), each one using different textures . As a consequence, i cannot rely on SKAttribute and should initialize multiple SKShader based on same source file.


Most of the time, i'm using approximatively 1000~1500 nodes with a custom SKShader.


On the Obj-C SKShader documentation a section named Important' is dedicated to performance improvement by using the proper SKShader initalizer :


Important

Even if their source code is identical, SpriteKit treats two shaders created with

initWithSource:uniforms:
as two separate shaders. To improve the performance of multiple instances of the same fragment shader code, create
SKShader
instances using
shaderWithFileNamed:
.

In the swift documentation page, this paragraph is not present.


My questions :


1. Is this still true/applicable in swift ?

2. I'm using swift and wasn't able to detect any major performances changes on CPU/GPU between the 2 initialisations methods. If 1) is true, where does this performance improvement might appears/be benefics to my app ?