cocos2d/cocos2d-swift — pull request #997 by thayerandrews (2014-09-26 18:55:59+00:00)
Title: CCEffects - Fixes for environment mapping effects and CCRenderTexture

Don't get the transform from an effect to its environment via the world transform since this doesn't work correctly when CCRenderTextures are involved. Instead get the transform via the closest common ancestor. If there are render textures involved, this ancestor must be descended from the render texture and not the other way around. If the reverse is true then there is no way to always find a valid transform.