performance opts: mipmap calc only on request and calc some matrices only if user-defined shader