CCEffectReflection - Tweak reflection math
CCEffectReflection - Tweak reflection math

Since we do not currently support cube mapping, using reflect(viewDir, normalDir) to compute
texture coordinates doesn't yield very nice looking results. It does create some nice distortion
but (to my eyes at least) it doesn't read as reflection and looks more like refraction. By experimentation
I've found the following looks better:

texCoordOffset = normalDir * (1.0 - dot(viewDir, normalDir))

Also, clamping the offset texture coordinates to [0..1] doesn't look as good for reflection as it does for
refraction. Instead, feed them through a cosine function so out of range values reflect.

lpeancovschi/cocos2d-objc,savysoda/cocos2d-objc,tambarskjelve/cocos2d-objc,finthamoussu/cocos2d-objc,DNESS/cocos2d-objc,nader-eloshaiker/cocos2d-objc,DNESS/cocos2d-objc,liduanw/cocos2d-objc,cogddo/cocos2d-objc,seem-sky/cocos2d-swift,TukekeSoft/cocos2d-spritebuilder,codepython/cocos2d-objc,nader-eloshaiker/cocos2d-objc,knight2010/cocos2d-objc,seem-sky/cocos2d-swift,dnessorga/cocos2d-objc,yaoxiaoyong/cocos2d-objc,yaoxiaoyong/cocos2d-objc,cogddo/cocos2d-objc,lpeancovschi/cocos2d-objc,savysoda/cocos2d-objc,oxeron/cocos2d-objc,cocos2d/cocos2d-objc,DNESS/cocos2d-objc,savysoda/cocos2d-objc,tambarskjelve/cocos2d-objc,TukekeSoft/cocos2d-spritebuilder,seem-sky/cocos2d-swift,SuPair/cocos2d-objc,dnessorga/cocos2d-objc,SuPair/cocos2d-objc,finthamoussu/cocos2d-objc,seem-sky/cocos2d-swift,liduanw/cocos2d-objc,zaneLou/cocos2d-objc,savysoda/cocos2d-objc,tambarskjelve/cocos2d-objc,SuPair/cocos2d-objc,nader-eloshaiker/cocos2d-objc,finthamoussu/cocos2d-objc,zaneLou/cocos2d-objc,knight2010/cocos2d-objc,dnessorga/cocos2d-objc,yaoxiaoyong/cocos2d-objc,SuPair/cocos2d-objc,DNESS/cocos2d-objc,knight2010/cocos2d-objc,zaneLou/cocos2d-objc,dnessorga/cocos2d-objc,tambarskjelve/cocos2d-objc,knight2010/cocos2d-objc,TukekeSoft/cocos2d-spritebuilder,codepython/cocos2d-objc,liduanw/cocos2d-objc,TukekeSoft/cocos2d-spritebuilder,DNESS/cocos2d-objc,yaoxiaoyong/cocos2d-objc,codepython/cocos2d-objc,codepython/cocos2d-objc,lpeancovschi/cocos2d-objc,zaneLou/cocos2d-objc,oxeron/cocos2d-objc,cogddo/cocos2d-objc,tambarskjelve/cocos2d-objc,cogddo/cocos2d-objc,liduanw/cocos2d-objc,cocos2d/cocos2d-objc,nader-eloshaiker/cocos2d-objc,yaoxiaoyong/cocos2d-objc,finthamoussu/cocos2d-objc,liduanw/cocos2d-objc,lpeancovschi/cocos2d-objc,SuPair/cocos2d-objc,dnessorga/cocos2d-objc