}
if (textureFile.exists()) {
try {
logger.info("Loading sky map: " + fileName);
if (fileName.toLowerCase().endsWith(".pfm")) {
return new PFMTexture(textureFile);
} else if (fileName.toLowerCase().endsWith(".hdr")) {
return new HDRTexture(textureFile);
} else {
return new SkymapTexture(ImageIO.read(textureFile));
}