texture handling refactor
unified texture and uniform handling