initial version of texture lookup; might not be correct