fix dirty codes
add refraction mapping