sklightnode

SKLightNode performance issues

…衆ロ難τιáo~ 提交于 2019-12-03 18:06:04
问题 I've been experimenting with SKLightNode in SpriteKit (new in iOS8) and, even in a really simple test case, I've been getting terrible performance. For instance, with a single light source on a solid color SKSpriteNode I get 13.2 FPS on a 3rd generation iPad . If I add a second light source , it drops to an abysmal 7.7 FPS . The WWDC session video What's New in SpriteKit mentions that you might get less than 60 FPS if you have more than one light on the same sprite, but I can't even get 60

SKLightNode cast shadow issue

…衆ロ難τιáo~ 提交于 2019-11-29 07:08:33
I have been unsuccessful in getting a SKSpriteNode to cast a shadow AND also be made to disappear when going into a shadow from the same light source. I am able to do one of the two but not both. According to the docs: If the sprite is inside a shadow cast by a light and the sprite has a lower z position than the light, the shadow affects how the sprite is lit. All of which I have done. My SKLightNode has a zPosition of 100 and all other nodes have lower zPositions. I have tried any and all combinations of settings for lightingBitMask, shadowCastBitMask and shadowedBitMask but nothing has

SKLightNode cast shadow issue

谁说胖子不能爱 提交于 2019-11-28 00:36:17
问题 I have been unsuccessful in getting a SKSpriteNode to cast a shadow AND also be made to disappear when going into a shadow from the same light source. I am able to do one of the two but not both. According to the docs: If the sprite is inside a shadow cast by a light and the sprite has a lower z position than the light, the shadow affects how the sprite is lit. All of which I have done. My SKLightNode has a zPosition of 100 and all other nodes have lower zPositions. I have tried any and all